Encoders & Decoders
Base64 turns binary data into plain ASCII text so it can pass through systems that only handle text: JSON payloads, email bodies, HTML attributes, HTTP headers and environment variables. You run into it when you inline a small icon into CSS, read a JWT, inspect an email attachment, or store a file in a database column that only accepts strings.
These tools cover the common cases. Encode text to Base64, decode a Base64 string back to readable text, turn an image file into a data URI for an img tag or a CSS background, and convert a Base64 string back into an image you can view and download. The image tools show the resulting size. Check that number before you inline an image: Base64 adds roughly 33%, so a 30 KB PNG becomes about 40 KB of text.
HTML entities solve a related problem with a different alphabet. The encoder escapes <, > and & so a stray bracket renders as a character instead of opening a tag. The decoder turns a page full of &amp; and &#8217; back into readable punctuation, which covers most of what you need after a CMS export or a scrape.
Everything runs on the browser's built-in APIs, so files stay on your machine. That matters when the image is a customer document or the text is a credential.
-
Base64 Encoder
Encode text or files to Base64, with full UTF-8 and emoji support.
-
Base64 Decoder
Decode Base64 to readable UTF-8 text.
-
Image to Base64
Convert an image to a Base64 data URI for HTML or CSS.
-
Base64 to Image
Preview a Base64 string or data URI as an image and download it.
-
HTML Encoder
Escape text into HTML entities: named, decimal or hex.
-
HTML Decoder
Turn HTML entities such as & and ’ back into plain text.
-
Text to Binary Converter
Convert text to UTF-8 bytes in binary, hex, decimal or octal, and back.
-
JSON Escape / Unescape
Escape text into a JSON string, or unescape one back to plain text.
-
String Escape / Unescape (Backslash)
Escape or unescape string literals for JS, Python, PHP, Bash, SQL and regex.
-
Hex to Text Converter
Decode hex bytes to UTF-8 text, or encode text as hex.
Which tool for which job
-
Encode text or a file for a JSON field, a header or an environment variable
Base64 Encoder. Text is encoded as UTF-8 first, so accented letters and emoji work. Plain btoa() throws an error on them.
-
Read a Base64 value from a Kubernetes secret or an email source
Base64 Decoder. The bytes are decoded as UTF-8, so text in any language comes back intact.
-
Inline a small icon in CSS or HTML
Image to Base64. You get the whole data URI, MIME type prefix included, ready for src or url().
-
See which image a data URI contains
Base64 to Image. Paste the string with or without the data: prefix, check the preview and download it as a file.
-
Show code or user input on a page without the browser running it
HTML Encoder. Escaping <, > and & turns markup into visible text. Choose named, decimal or hex entities to match the rest of the file.
-
Clean & and ’ out of exported text
HTML Decoder. Entities from a CMS export or a scraped page turn back into the plain characters they stand for.
-
Put a multi-line string or a block of HTML into a JSON value
JSON Escape / Unescape. Quotes, backslashes and line breaks are escaped so the result can sit between double quotes in a JSON file.
-
Paste a Windows path or a regex into a string literal
String Escape / Unescape (Backslash). Pick the target language first. JavaScript, Python, PHP, Bash, SQL and regex each escape a different set of characters.
-
Read bytes from a hex dump or a packet capture
Hex to Text Converter. The bytes are decoded as UTF-8, and the tool can also encode text back to hex.
-
See how many bytes a character takes
Text to Binary Converter. In UTF-8, é is two bytes and most emoji are four, which matters when a field or a protocol limits length in bytes.