URL Encode / Decode

Percent-encode text for safe use in URLs, or decode an encoded URL back into readable text — all in your browser, instantly and privately.

URL Encode / Decode features

Encode & Decode

Switch between percent-encoding text and decoding encoded URLs with a single mode toggle.

Component vs Full URL

Choose encodeURIComponent for single values or encodeURI to keep whole-URL structure intact.

One-Click Swap

Flip input and output to instantly reverse between encode and decode and verify a round trip.

100% Private

All encoding and decoding runs locally in your browser — your text is never uploaded.

Instant Results

Output updates as you type, with no buttons to press and no waiting on a server.

Copy in One Click

Grab the encoded or decoded result and paste it straight into your code or address bar.

Overview

URL encoding, also called percent-encoding, replaces characters that are unsafe or reserved in a URL with a % followed by their hexadecimal byte value. For example, a space becomes %20 and an ampersand becomes %26. This keeps URLs valid when they contain spaces, punctuation, or non-ASCII text.

The web reserves certain characters because they have special meaning in a URL. Reserved characters like &, =, ?, /, #, and : act as delimiters that separate parts of the address. Unreserved characters — letters, digits, and a few symbols like -, _, ., and ~ — are always safe and are never encoded. Everything else should be percent-encoded.

This tool encodes and decodes text using a mode toggle with a Swap button, plus a Scope select. Component mode uses encodeURIComponent, which encodes delimiters such as &=?/ so a value can sit safely inside one query parameter. Full URL mode uses encodeURI, which preserves the overall structure of a complete address and leaves those delimiters intact.

Use Component scope when encoding a single piece of data — like a search term or a query-string value. Use Full URL scope when you have an entire link with a path and query and only want unsafe characters fixed without breaking the address.

How to use the URL Encode / Decode

  1. Paste or type your text or URL into the input box.
  2. Choose the mode: Encode to percent-encode, or Decode to convert encoded text back to plain text.
  3. Pick a Scope: Component (encodeURIComponent) to encode reserved characters like &=?/, or Full URL (encodeURI) to preserve the URL structure.
  4. Read the converted result in the output box as you type.
  5. Click Copy to copy the output, or use Swap to flip the input and output and reverse the operation.

Good to know

A few things worth keeping in mind when encoding and decoding URLs:

  • Component and Full URL are not interchangeable. Encoding a whole address with Component scope will escape its : and / delimiters and break the link; use Full URL for complete addresses.
  • Encoding is not encryption. Percent-encoding only makes characters URL-safe — it does not hide or secure data. Anyone can decode it.
  • Decode only handles valid sequences. Malformed input like a stray % not followed by two hex digits may fail or be left unchanged.
  • Spaces: this tool encodes a space as %20. The + form used in some legacy form submissions is a separate convention and is not produced here.

Private by design

Every byte you paste into the URL Encode / Decode is processed locally in your browser. Formatly makes no network request with your data, logs nothing, and stores nothing on any server — so it is safe for API responses, tokens, configuration and other sensitive content. Your most recent input and theme are saved only in your own browser's local storage.

URL Encode / Decode FAQ

Is my data safe? Does anything get uploaded?

Yes, it is completely safe. All percent-encoding and decoding happens locally in your browser using built-in JavaScript functions. Nothing you type is ever sent to a server, logged, or stored, so it is safe for private URLs, tokens, and query values.

Does this tool work offline?

Yes. Because the conversion runs entirely client-side, once the page has loaded it keeps working without an internet connection. You can encode and decode URLs even while offline.

What is the difference between Component and Full URL scope?

Component uses encodeURIComponent and encodes reserved delimiters such as &, =, ?, and / — ideal for a single query value or path segment. Full URL uses encodeURI and leaves those delimiters intact so an entire address keeps its structure. Use Component for one value; use Full URL for a complete link.

When should I percent-encode a URL?

Encode whenever your URL contains spaces, non-ASCII characters, or reserved symbols that are not acting as delimiters. For example, a search term with spaces and an ampersand must be encoded — tea & coffee becomes tea%20%26%20coffee in Component mode — so it does not break the query string.

What are reserved and unreserved characters?

Reserved characters like &, =, ?, /, #, and : have special meaning in a URL and separate its parts. Unreserved characters — letters, digits, and -, _, ., ~ — are always safe and never encoded. Component mode encodes the reserved set; Full URL mode preserves it.

Why does my decoded text look wrong or unchanged?

Decoding only converts valid percent-encoded sequences such as %20 back to their characters. If the input was not encoded, or contains a malformed sequence, the text may appear unchanged or fail to decode. Use the Swap button to encode first, then decode, to confirm a correct round trip.