Category · 10 codecs
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.
Base64 & Data URIs
Encode UTF-8 text or image binaries into printable ASCII payloads and decode them back cleanly.
RFC 4648 · +33% payload · UTF-8 safeBase64 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.
Markup & String Escaping
Neutralize special syntax in HTML documents, JSON payloads, and string literals across 8 languages.
HTML5 · RFC 8259 · BackslashHTML Encoder
Escape text into HTML entities: named, decimal or hex.
HTML Decoder
Turn HTML entities such as & and ’ back into plain text.
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.
Raw Bytes, Hex & Binary
Inspect underlying UTF-8 byte sequences in hexadecimal, binary, decimal, or octal representation.
UTF-8 · 1–4 bytes/char · RadixReference · Why encoding differs from escaping
UTF-8 bytes under the hood
Binary-to-Text Encoding
Base64 packs arbitrary bytes into 64 ASCII characters so binary data and UTF-8 strings survive transport headers intact.
Syntax Escaping
HTML entities, JSON escapes, and backslash sequences keep delimiter characters like brackets or quotes literal inside a parser.
Byte Inspection
Hex and binary readouts expose hidden BOM markers, smart quotes, or multi-byte characters behind visually identical glyphs.
Task guide
Which codec 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.
Notes
About encoders and decoders
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.
Browse more
Other tool categories
Encoding specs
Character and binary encoding RFCs
Answers
Encoding and escaping questions
Is Base64 a form of encryption?
No. Base64 uses no key, so anyone who has the string can decode it in one step. It exists to carry binary data through channels that only accept text. If a value has to stay secret, encrypt it first, then Base64-encode the ciphertext if you need it as text.
What is the difference between Base64 and URL encoding?
Base64 rewrites any bytes using an alphabet of 64 safe characters, and the result is about a third longer than the input. URL encoding leaves letters and digits alone and replaces only the characters that would break a URL, such as a space with %20. Standard Base64 uses + and /, which mean something in a URL, so tokens and JWTs use the base64url variant with - and _ in their place.
Why does decoded text show é instead of é?
The bytes are UTF-8, but something read them as Latin-1 or Windows-1252. In UTF-8, é is the two bytes C3 A9, and in Latin-1 those bytes are the characters à and ©. Decode as UTF-8, or find the step in your pipeline that assumed a single-byte encoding.