Skip to content

URL Encoder & Decoder

Encode or decode text for use in a URL, with three distinct modes: a single component (query value, path segment), a full URL that keeps its structural characters intact, and application/x-www-form-urlencoded, which uses + for a space instead of %20.

  • Component, full-URL and form-urlencoded modes
  • Correct UTF-8 handling for accents and emoji
  • Clear error on malformed percent-encoding
  • Encode and decode in one tool
  • Runs fully client-side

Encoder

Converted locally, nothing uploaded

Output

How to encode or decode a URL

  1. 01

    Pick encode or decode

    Encode turns readable text into a URL-safe form; decode reverses it.

  2. 02

    Choose the right mode

    Component for a single query value or path segment, full URL to encode an entire address without breaking its structure, or form-urlencoded for an HTML form submission.

  3. 03

    Paste and copy

    The result updates as you type. Copy it directly into wherever it is going.

Why there are three modes, not one#

encodeURIComponent and encodeURI are not interchangeable, and picking the wrong one either breaks a URL or fails to protect a value inside it. Component mode encodes everything except a small set of unreserved characters — letters, digits, and - _ . ! ~ * ' ( ) — which is correct for a single value going into a query parameter or path segment, since it also escapes &, =, / and ?, the characters that would otherwise be misread as URL structure.

Full URL mode does the opposite on purpose: it leaves : / ? # [ ] @ ! $ & ' ( ) * + , ; = alone, because those characters are meaningful structure in a complete URL — encoding them would turn https://example.com/a?b=1 into a mess. Use this mode only on an entire URL, never on a single parameter value.

What form-urlencoded actually is#

application/x-www-form-urlencoded is the MIME type of a standard HTML form submission, and it is close to component encoding with one specific difference: a space becomes +, not %20. This convention predates encodeURIComponent and is still what browsers send for a plain <form method="get">, and what many server frameworks expect when reading query strings and form bodies. Mixing this mode up with component encoding is a common source of a literal + showing up in decoded text instead of a space, or vice versa.

Why decoding sometimes fails#

A percent-encoded sequence is always three characters: % followed by exactly two hexadecimal digits. A stray % in text that was never actually encoded — common in URLs containing a literal percent sign, like a discount code — breaks decoding outright, since the decoder cannot tell a real escape sequence from an unrelated % followed by ordinary text. This tool reports that failure explicitly instead of silently returning something wrong.

Frequently asked questions

What's the difference between component and full URL mode?

Component mode encodes everything except unreserved characters, including & = / ? — correct for a single value going into a query parameter. Full URL mode leaves those structural characters alone, since encoding them would break an entire URL. Use component for one value, full URL for a whole address.

What is form-urlencoded, and how is it different?

It is the encoding used by standard HTML form submissions — almost identical to component encoding, except a space becomes + instead of %20. It matters when reading or constructing a query string the way a plain HTML form would generate it.

Why did decoding fail with an error?

Almost always a stray % that was not actually part of a valid escape sequence — every percent-encoded character must be % followed by exactly two hex digits. A literal percent sign in the original text (a discount code, a percentage value) that was never encoded will trigger this.

Does this handle accented characters and emoji correctly?

Yes — encoding and decoding both work on the UTF-8 byte representation, the same as a browser does natively, so non-ASCII characters round-trip correctly.

Is my text sent anywhere?

No. Encoding and decoding happen entirely in your browser — nothing is uploaded.

Developers

UUID Generator

Generate cryptographically random UUID v4 or time-ordered UUID v7, in bulk.

Developers

Base64 Encoder & Decoder

Encode and decode Base64 with correct UTF-8 handling, including the URL-safe alphabet.

Developers

ULID Generator

Generate ULIDs — sortable by creation time like UUID v7, but Crockford Base32 instead of hex.