About String Encoder / Decoder
The String Encoder / Decoder tool lets you quickly convert text between different encoding formats used across the web. It supports three major encoding schemes: Base64, URL encoding (percent-encoding), and HTML entities. Each encoding serves a specific purpose in web development, and this tool makes it easy to convert between them without writing any code.
Supported Encodings
- Base64 — a binary-to-text encoding that represents binary data as an ASCII string. Commonly used in data URIs, email attachments (MIME), embedding images in CSS, and transmitting data in APIs that only accept text.
- URL Encoding — also known as percent-encoding, this replaces unsafe characters in URLs with a "%" followed by their hex code. Essential for encoding query parameters, form data, and any text that appears in a URL.
- HTML Entities — converts special characters like angle brackets, ampersands, and quotes into their HTML entity equivalents. This prevents browsers from interpreting text as HTML markup and is critical for preventing XSS (cross-site scripting) vulnerabilities.
How to Use
Enter or paste your text in the input field. Select the encoding category (Base64, URL, or HTML) using the tabs, then click the appropriate encode or decode button. The result appears instantly in the output area, where you can copy it or swap it back into the input field for further processing. The "Swap Input/Output" button is handy for quickly decoding an encoded result or vice versa.
Common Use Cases
Developers use Base64 encoding to embed images directly in HTML or CSS, encode authentication tokens, or pass binary data through text-only channels. URL encoding is essential when building query strings, handling form submissions, or constructing API requests. HTML entity encoding is used to safely display user-generated content on web pages, escaping characters that could otherwise be interpreted as HTML or JavaScript. All operations are performed entirely in your browser for maximum privacy and speed.