Text Encoder / Decoder
Instantly encode or decode text in Base64, URL (percent-encoding), HTML entities, and hexadecimal. Bidirectional — switch between encode and decode with one click.
Format
Use this with
Related dev utilities tools
Encoding Guide
Text encoding: the formats every developer and technical SEO needs
Text encoding is the process of converting text into a specific format that can be safely transmitted or stored. Every web developer eventually needs to debug a Base64 string, decode a percent-encoded URL, or fix mangled HTML entities. This tool handles the four most common encoding formats used in web development and SEO.
Base64: the data transport format
Base64 encodes binary data (or text) using 64 safe ASCII characters. Used for embedding images in CSS/HTML, encoding API credentials (Basic Auth headers), JWT tokens, and data URIs. It inflates size by ~33% but ensures safe transport across systems that don't handle binary. Decode any Base64 string to read its contents.
URL encoding: percent-encoding explained
URLs can only contain certain ASCII characters. Special characters (spaces, &, =, #) must be percent-encoded as %20, %26, %3D, %23. Query parameters, search terms with spaces, and non-ASCII characters all need URL encoding. This is what happens when you copy a Google search URL and see %22 instead of quote marks.
HTML entities: preventing XSS and fixing display
<, >, &, " — these characters have special meaning in HTML. Displaying them as literal text requires encoding them as <, >, &, ". Failure to encode user input in HTML is the root cause of XSS (Cross-Site Scripting) vulnerabilities. This tool shows you the properly encoded versions for safe HTML insertion.
Hexadecimal: the raw bytes view
Hex encoding represents each byte as two hex digits (00-FF). Used in debugging HTTP headers, examining binary files, color codes (#FF5500), and cryptographic hashes. If you're looking at raw protocol data or need to understand what bytes a string consists of, hex encoding exposes the underlying byte values.
SEO use cases for encoding
URL encoding is directly SEO-relevant: special characters in URLs must be percent-encoded for proper canonical matching. A URL with unencoded spaces (treated as %20) may create duplicate content. Decoding encoded URLs from analytics reports or Search Console makes them readable for analysis.
Decoding obfuscated content
Spam and malware often use Base64 encoding to obscure content from email filters and security scanners. Technical SEOs sometimes encounter Base64-encoded content in spam backlinks. Pasting the encoded string here and decoding it reveals the actual content — useful for disavow research.
Pro Tips
JWT tokens have three Base64-encoded sections separated by periods. Paste just the middle section (the payload) and decode with Base64 to read the claims. Note: the Base64 in JWTs uses URL-safe encoding — this tool handles that automatically.
When analyzing Search Console or GA4 data, URLs often contain percent-encoded characters that make them hard to read. Paste the encoded URL and decode it for a human-readable version. Useful for understanding referral paths and query parameters.
Before inserting user-submitted content into HTML templates, encode it with HTML entities. This converts < to < and prevents script injection. Use this tool to test how a piece of user input looks after sanitization.
Frequently Asked Questions
- Is Base64-encoded content indexable by Google?
- No — Google cannot read text hidden in Base64-encoded data attributes or data URIs. If you have text content that needs to be indexed, it must be in the rendered HTML, not encoded. Base64 images in CSS are fine since image content isn't text-indexed anyway.
- Why does my URL encoding produce %20 instead of +?
- Both %20 and + represent a space in URLs, but in different contexts. %20 (encodeURIComponent) is correct for URL path segments and most modern usage. + is only valid in query strings under the older application/x-www-form-urlencoded format. This tool uses %20 (the more universally correct form).
- What's the difference between HTML encoding and escaping?
- They're effectively the same thing in practice — both convert special HTML characters to entity references. 'Escaping' is the general concept; 'HTML encoding' is the specific implementation. Both prevent browser misinterpretation of characters like < and & in content.
- Can I decode multiple Base64 strings at once?
- This tool processes one text block at a time. Paste the Base64 string, select Base64 mode, and click Decode. For batch decoding, you'd need to process each string individually — or build a script using atob() in JavaScript for bulk operations.