URL Encoder / Decoder

Encode or decode one URL component with encodeURIComponent and decodeURIComponent. The text never leaves this browser.

Last updated: October 5, 2026

Tool

This tool will load here.

What this tool does

A url encoder on this page percent-encodes one component, or decodes one component that is already percent-encoded. The buttons call encodeURIComponent and decodeURIComponent. They do not call encodeURI, and they do not try to decide which characters in a full address are syntax and which are data.

That distinction matters as soon as the text contains a question mark, an ampersand, or an equals sign. Inside a query value those characters are data, so they must be escaped or the next parser will treat them as separators. encodeURI leaves them alone because a whole URL still needs them as structure. If you run a full address through this page, the scheme colon, the slashes, and those separators will be escaped too. The result is a single component, not an address you can open.

Spaces become %20, not a plus sign. A plus sign is an application/x-www-form-urlencoded convention, and this page does not apply it. Unicode is encoded as UTF-8 bytes and then as percent sequences. Decoding reverses that. A truncated sequence such as a trailing % or a non-hex pair such as %ZZ throws, and the status says the percent-encoding is malformed. The result box is cleared so a previous success does not sit under the error.

The work stays in the browser. There is no request, no analytics call, and no copy of the text in local storage. The limit is 200,000 characters, the same cap used by the other text tools. Longer input is refused before encoding starts.

How to use

  1. Paste the component into the first box. Do not add a scheme unless that scheme is part of the component you actually want escaped.
  2. Choose Encode Component or Decode Component.
  3. Copy reads the result box. Clear empties both boxes and the status line.

Empty input is an error. A string of spaces is real text and encodes. You do not need to trim it yourself. Keyboard focus stays on the controls that are already on the page. The result is a textarea value, so characters that look like markup are not interpreted as HTML.

Example

Encoding a b&c?=é produces a single component in which the space, the ampersand, the question mark, the equals sign, and the accented character are all percent-encoded. Decoding that result returns the original characters. Decoding %20 returns a space. Decoding % or %ZZ stops with a malformed-sequence error.

a%20b%26c%3F%3D%C3%A9

If the next step is to see how a finished address splits into host, path, query rows, and hash, use the URL Parser Tool. Build the address first, then parse it. Do not expect this encoder to leave the separators intact.

Limits

  • One component. Not a full URL, and not a slug.
  • encodeURIComponent and decodeURIComponent only.
  • Malformed percent sequences are errors.
  • 200,000 characters. Text stays in this browser.

People sometimes ask this page to “fix” a URL that already mixes raw spaces with existing percent sequences. Encoding that string will escape the percent signs themselves, so a later decode will not restore the original bytes in one step. Decode first if the text is already encoded, or encode the raw value before you join it to the rest of the address.

A component can legally contain a slash after encoding, shown as %2F. Some servers treat a decoded slash as a path separator again. This page will not guess which servers do that. It reports the encoding and stops.

Copy uses the clipboard API when the browser allows it. If the page is not allowed to write the clipboard, the status tells you to select the result and copy it yourself. Clear does not keep a second copy in a script variable. The result box is the only output.

Use this when a form, a query value, or a path segment must survive the trip into a URL. Use a parser when you already have an absolute URL and you want its parts. The two jobs are linked because they sit on opposite sides of the same encoding rules, and they are not the same button.

On this page

Related guides

Related solutions

Need another tool ?

Open the free tools — no signup.

FAQs

newsletter signup

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Innovative Solutions For Modern Needs
Copyright © 2026 Yallasolve. all rights reserved.