Free Online Encoding Tools – Encode Files, Data & Messages

Convert text to and from Base64, URL-encoded strings, HTML entities and hexadecimal. The result updates as you type, handles Unicode correctly, and stays in your browser.

Online Encoder & Decoder

Choose a format, pick a direction, then type or paste your text.

Direction
0 characters · 0 bytes
0 characters · 0 bytes

New: Peel nested layers unwraps text that was encoded more than once (for example Base64 inside URL encoding) and shows every step. You can also detect common formats automatically, create and decode Data URIs, process multiple lines at once, save results as a text file, or verify an encode/decode round trip.

Runs entirely in your browser; this tool does not upload or store your text. Encoding is not encryption, so never treat encoded text as secret.

How to use this encoder / decoder

  1. Choose a format: Base64, Base64 URL-safe, URL, HTML entities, hexadecimal or Data URI. See common encoding types if you are not sure which one you need.
  2. Select Encode to convert plain text, or Decode to turn encoded text back into readable text.
  3. Type or paste your text. Options that apply to the chosen format, such as Base64 padding or how spaces are written in a URL, appear above the input.
  4. Copy or download the result. Use Swap to reverse the direction, or choose Auto-detect & decode when you are unsure which supported format was used.
  5. For Data URIs, select Data URI, choose a content Type (Text, Image, Audio, Video, Application, Font, Model, Multipart, Message, or Custom), then enter or choose the MIME subtype. When decoding, the tool reads the MIME type from the Data URI and updates the Type selector automatically.
  6. For lists, enable Batch mode to process one value per line. Use Verify round trip after encoding to confirm that decoding restores the original input.
  7. If text was encoded more than once, such as Base64 wrapped in URL encoding, select Peel nested layers. The tool decodes up to eight layers in a row and lists each step under Decoding path.

Quick answers: Base64, URL encoding, HTML entities, hex and Data URIs

Base64 is a way to write binary data using 64 printable characters (A–Z, a–z, 0–9, + and /), so the data can travel safely through text-only systems such as email, JSON or HTML. It makes data about one third larger and is not encryption.

URL encoding (percent-encoding) replaces unsafe characters in a web address with a % sign followed by two hexadecimal digits, for example a space becomes %20 and & becomes %26.

HTML entities are text codes such as & and < that let a browser show characters that would otherwise be read as HTML markup.

Hexadecimal encoding writes every byte of the data as two characters from 0–9 and a–f, which makes the raw UTF-8 bytes of a text easy to read and compare.

A Data URI embeds a small file or text directly inside a link using the pattern data:[media type];base64,[data], so no separate file request is needed.

Which format should I use? Example input: Café & Co
FormatUse it whenResult for the example
Base64Sending binary or Unicode text through a text-only channel.Q2Fmw6kgJiBDbw==
Base64 URL-safePlacing Base64 in a URL, filename or token (uses - and _, padding optional).Q2Fmw6kgJiBDbw
URL (component)Encoding one query-string value or path segment.Caf%C3%A9%20%26%20Co
URL (full address)Cleaning a whole address while keeping : / ? & # intact.Caf%C3%A9%20&%20Co
HTML entitiesShowing text that contains < > & or quotes inside an HTML page.Café &amp; Co
HexadecimalInspecting the exact UTF-8 bytes of a text.43 61 66 c3 a9 20 26 20 43 6f

Last reviewed: . Everything on this page runs in your browser.

Encoding, decoding, and safe handling of data

Laptop displaying data encoding and decoding interface with green code on screen

Encoding utilities convert data into a representation that another system can transport or interpret. Depending on the format, the transformation may make characters safe to place in a URL, represent binary data as text, or convert a value between common textual encodings. Encoding is not the same as encryption. A string that looks complicated may still be readable or reversible by anyone who knows the format. Never rely on simple encoding to protect passwords, confidential documents, payment details, or personal information.

Before using an encoder or decoder, confirm the exact format and expected destination. URL encoding, Base64 representation, HTML entity conversion, and other transformations solve different problems. Applying the wrong one may break a link or change the way content is interpreted. When the result will be inserted into code or a web page, consider the security context as well as the format. Escaping text for one context does not automatically make it safe for every other context, and a decoder does not validate the origin or trustworthiness of the input.

Treat unknown encoded content as untrusted. Do not open a file, execute a command, or follow a link just because you have successfully decoded it. Read the resulting text, check for unexpected characters or instructions, and compare it with the source when possible. If you are working with credentials or production data, use your organization’s approved security tools and documented process. A simple conversion can be convenient, but it should never replace access controls, encryption, secure transport, or sound judgment about where information came from.

How Encoding and Decoding Work

Encoding changes information into a defined representation so it can be stored, transmitted, or interpreted by another system. Decoding reverses that representation when the matching format is known. The right method depends on what the data is for: a URL, a text file, a message, or an application data structure may each require a different approach.

Common Encoding Types and When They Are Used

  • URL or percent encoding: represents characters that need special handling inside a URL. For example, a space is commonly represented as %20; form-encoded query strings may use + for a space. The correct behavior depends on the URL component and encoding convention.
  • Character encoding (such as UTF-8): maps text characters to bytes so files and systems can store or exchange text consistently. A mismatch between the encoding used to write data and the one used to read it can produce garbled characters.
  • Base64: represents binary data using a limited set of text characters, which can be convenient in text-based formats. It is not encryption and does not make confidential data secret.
  • HTML entities: represent certain characters in HTML markup, helping text be interpreted as intended in that context. HTML escaping is context-specific and does not replace proper sanitization or other security controls.
  • Serialization and deserialization: convert structured application data into a transferable or storable format and reconstruct it later. JSON is one common format used across programming languages and platforms.

Encoding Is Not Encryption

Encoding is primarily about representation and compatibility; encryption is designed to protect confidentiality using cryptographic methods and keys. Encoded text may be easy to reverse without a secret key. Do not use Base64, URL encoding, character conversion, or other reversible formatting as a way to protect passwords, private records, or other sensitive information.

Encoding and Decoding in Programming

In Python, text is represented as Unicode, while files and network connections commonly transfer bytes. Encoding converts text into bytes using a selected character encoding; decoding interprets bytes as text using the matching encoding. In Java and other languages, the exact APIs differ, but the same basic rule applies: the sender and receiver must agree on the data format. Structured data may also need serialization before it is transmitted and deserialization after it arrives.

A Simple, Safe Workflow

  • Identify the format you actually have, such as URL-encoded text, Base64, UTF-8 bytes, or JSON.
  • Choose a tool or programming method that supports that specific format.
  • Decode only when you understand what the result is expected to represent.
  • Inspect the output for unexpected characters, broken text, or content that does not match the original context.
  • Before placing the result into a URL, HTML page, or program, apply the handling appropriate to that destination. One type of escaping is not automatically safe in every context.

Why Encoding Matters Beyond Text

Encoding also appears in digital communication systems, where signals are mapped to patterns that can be transmitted and recognized at the receiving end. Historical examples include Morse code and Manchester encoding. In everyday communication, the idea is broader: a person formulates a message, sends it through a channel, and another person interprets it. Noise, incompatible formats, or missing context can cause the received meaning to differ from the intended one.

Privacy Policy for the Encoder / Decoder Tool

Last updated: November 10, 2026. This page explains how information is handled when you use the Lunexis Base64, URL, HTML, Hexadecimal, and Data URI Encoder / Decoder.

How your text is processed

The conversion functions run in your web browser using JavaScript. Text entered into the Input field is processed locally by the tool; the conversion feature does not send your input or generated result to a conversion server. The tool does not create an account, submit your text to a conversion API, or intentionally save your input or result in a remote database.

What the tool does with your data

  • Input and results: Used in the browser to perform the conversion you request. The page's conversion code does not upload or store this text on a Lunexis conversion server.
  • Batch mode: Processes the lines you provide in the browser, one line at a time.
  • Auto-detect, peel nested layers and verification: Analyze the entered text, unwrap repeated encodings, and compare a conversion round trip locally in the browser.
  • Copy and download: Copy sends the result to your device's clipboard when you choose that action. Download creates a text file through your browser.
  • Data URI and MIME type: The selected MIME type is used to construct the Data URI in the browser. It is not a file upload function.

Website and technical information

When you visit any website, its hosting provider may process ordinary connection information needed to deliver the page, such as the requested URL, time of request, IP address, browser, and device information. This is separate from the text conversion performed by this tool. Any site-wide analytics, advertising, cookies, or third-party services, if used on Lunexis Tools, are governed by the applicable site-wide notices and provider policies; this tool-specific explanation does not make claims about those services.

Information you should not enter

Although conversion happens in your browser, use caution on shared or compromised devices and avoid entering passwords, authentication tokens, payment details, private keys, confidential business records, or other highly sensitive information. Browser extensions, malware, screenshots, clipboard history, or other software on your device may be able to access information independently of this page.

Data retention and your choices

The conversion tool does not provide a server-side history or account-based storage for your input and results. You can clear the Input and Result fields, close the page, and remove any downloaded file or copied clipboard content using your device's normal controls. Your browser or operating system may manage clipboard history and downloaded files separately.

Changes and contact

This tool-specific notice may be updated when the tool's features or data handling change. For questions about this notice or the wider Lunexis Tools website privacy practices, use the contact method published on the Lunexis Tools website.

Standards and further reading

Frequently Asked Questions

Is my text uploaded to a server when I use this tool?

No. The encoder and decoder process the text in your browser. The conversion feature does not send your input or result to a conversion server. Normal website hosting may still process technical connection information when you load the page.

Which formats can I encode and decode?

You can work with standard Base64, URL-safe Base64, URL component values, full URL addresses, HTML entities, hexadecimal UTF-8 bytes, and Data URIs using Base64 or percent-encoded content.

What is the difference between URL component and full URL encoding?

URL component mode encodes reserved characters so a value can be safely placed inside a query parameter or another URL component. Full URL mode preserves URL structure characters such as : / ? & # so the address structure remains readable. Use the mode that matches the part of the URL you are converting.

What does URL-safe Base64 mean?

URL-safe Base64 replaces the + and / characters used by standard Base64 with - and _. This tool accepts URL-safe Base64 and can decode input even when its trailing = padding is omitted.

What is a Data URI?

A Data URI places data directly inside a URI and includes a media type, such as text/plain or image/png. This tool can create Base64 Data URIs with a MIME type you choose and decode Base64 or percent-encoded Data URIs.

What does the MIME Type selector do?

The Type selector lets you choose a category such as Text, Image, Audio, Video, Application, Font, Model, Multipart, Message, or Custom. The Data MIME type field sets the media type included in the generated Data URI. Choose a type that accurately describes the content; selecting a MIME type does not convert text into an image, audio, or video file.

Can I enter my own MIME type?

Yes. Choose Custom / Other or edit the Data MIME type field and enter a valid type and subtype, such as application/json or image/svg+xml. Optional parameters such as charset=utf-8 may also be included.

What does Batch Mode do?

Batch Mode processes each input line separately and places the converted lines in the result. It is useful when you have multiple independent values to encode or decode. Keep each item on its own line.

What does Auto-detect do?

Auto-detect checks the input for supported encoded formats and selects a likely decoding format. Detection is a convenience, not a guarantee; if the format is ambiguous, choose the correct format manually and review the result.

What does Verify Round Trip check?

Round-trip verification checks whether encoding the input and then decoding it again reproduces the original text. A successful check confirms that the selected conversion round-trips for that input; it does not prove that the content is secure or trustworthy.

Can I download the converted result?

Yes. Use the Download Result control to save the generated output as a text file through your browser. The download is created on your device; it is not an upload to Lunexis.

Why does decoding say the result is not valid UTF-8 text?

The decoded bytes may represent binary data, such as an image or file, rather than readable UTF-8 text. They may also use a different character encoding. This tool's text output expects valid UTF-8 for the formats that decode bytes into text.

Does encoding protect passwords or private information?

No. Base64, URL encoding, HTML entities, hexadecimal, and Data URI formatting are not encryption. Do not use them to protect secrets. Use appropriate encryption and access controls when confidentiality is required.

Can decoding make a suspicious message or file safe?

No. Decoding only changes the representation of data. It does not verify who created it or whether the resulting content is safe to open, execute, or follow. Treat unknown content as untrusted.

What does Peel nested layers do?

Peel nested layers repeatedly detects and decodes text that was encoded more than once, for example Base64 wrapped inside URL encoding or hexadecimal. It stops when no further supported encoding is found or after eight layers, and the Decoding path panel lists each step. Detection is a convenience, so review the result.

How do I decode text that was encoded twice?

Use Peel nested layers. It decodes the outer layer first and then the next one automatically. You can also decode manually by reversing the order in which the layers were applied: if the data was Base64-encoded and then URL-encoded, decode the URL encoding first and then the Base64.

Does the encoder work offline?

The conversion code is part of the page and runs in your browser, so once the page has loaded the conversion itself does not need a network connection. Loading the page, its images and other site resources still requires one.

Is there a size limit?

The tool applies an input limit of approximately one million characters to help keep the page responsive. Very large inputs may also be limited by your browser's available memory and performance.