A virtual teacher who reveals to you the great secrets of Base64

CSS to Base64

This online converter allows you to encode CSS to Base64. In most cases, you do not need to do this because you can use the <style> tag to embed CSS as “source code”. Perhaps, it may be useful if you need to embed a user CSS into an HTML page, but you do not want to deal with its escaping and validating. If you need to encode images from CSS to Base64 encoded data URI, use the CSS Data URI Converter.


How to convert CSS to Base64

  1. Type or paste your CSS into the “CSS source” field.
  2. If necessary, select the desired output format.
  3. Press the “Encode CSS to Base64” button.
  4. Download or copy the result from the “Base64” field.

Output formats

If you do not know what output format you need, check the following examples to see how will look the result of the same Base64-encoded CSS formatted in each of the available formats:

Plain text:
Ym9keSB7DQogIGNvbG9yOnJlZA0KfQ==
Data URI:
data:text/css;base64,Ym9keSB7DQogIGNvbG9yOnJlZA0KfQ==
HTML Hyperlink:
<a href="data:text/css;base64,Ym9keSB7DQogIGNvbG9yOnJlZA0KfQ=="></a>
HTML Style:
<style type="text/css">
  @import url("data:text/css;base64,Ym9keSB7DQogIGNvbG9yOnJlZA0KfQ==");
</style>
HTML Stylesheet:
<link rel="stylesheet" type="text/css" href="data:text/css;base64,Ym9keSB7DQogIGNvbG9yOnJlZA0KfQ==" />

If I missed an important output format for Base64-encoded CSS strings, please let me know — I would love to implement it.

Comments (6)

I hope you enjoy this discussion. In any case, I ask you to join it.

  • Subscribe,
    Awesome site! wait what? Where are the comments no work because there are no comments here i will try to comment!
  • nqhXncMU,
    1 waitfor delay '0:0:15' --
  • aaz,
    ‘Kkfmrjxrj
  • bibi,
    G-K7CFDCYECE
  • soul_embargo,
    I decode messages in my net stats by converting base64 to big-5 then using a translator. The hidden info passing through my devices is frightening, almost as if someone is passing messages to the ethers with info on how to build nukes and develop virus.'

    Everyone needs to pay a little more attention to what their networks are doing; there is more going through the data than connecting to the sites you requested.
  • test,
    010001 110100 100101 000110 001110 000011 011101 100001 000000 010000 000000 000001 000000 001111 000000 000000 000000 001111 111100 000000 000000 000000 000000 000000 000000 000010 110000 000000 000000 000000 000000 000000 000000 010000 000000 000001 000000 000000 000000 000010 000000 100100 010000 000001 000000 000011 001011
Add new comment

If you have any questions, remarks, need help, or just like this page, please feel free to let me know by leaving a comment using the form bellow.
I will be happy to read every comment and, if necessary, I will do my best to respond as quickly as possible. Of course, spammers are welcome only as readers.