url-encoder
                                
                                 url-encoder copied to clipboard
                                
                                    url-encoder copied to clipboard
                            
                            
                            
                        Add charset=utf8 to "Ready for CSS"
Hi! Thank you for a nice tool :)
For IE it's important to add 'charset=utf8' for background-image property like this
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3C/svg%3E");
If you don't do this, the image will not be displayed.
It would be nice to add charset automatically, what do you think?
Which IE versions is this needed for?
According to Taylor Hunt's blog post, Optimizing SVGs in data URIs, which references RFC 2397:
The best way of encoding SVG in a
data:URI isdata:image/svg+xml,[actual data]. We don’t need the;charset=utf-8parameter (or the invalid;utf8parameter in the first example), because the given SVG is ASCII.