URL Encoder & Decoder

Safely encode query text or decode percent-encoded URLs.

How it works

This tool uses encodeURIComponent and decodeURIComponent, which are intended for individual query components rather than complete URLs.

encodeURIComponent(input) or decodeURIComponent(input).

Debugging scenario

Start with one query value containing spaces, ampersands, equals signs, percent signs and non-ASCII text. Encode the value only, place it through the application URL builder and confirm the server receives one parameter with the original text after exactly one decode.

How to interpret the result

This tool applies the JavaScript component functions, so reserved delimiters are escaped as data. Encoding an entire URL hides structural separators, while decoding an arbitrary full URL can turn data into delimiters. Form encoding also commonly represents spaces as plus signs, which is a separate convention.

Input reference

Mode
Example default: Encode
Input
Example default: Sample input included

Common mistakes

  • Pasting secrets, credentials, customer records or other production data into a browser tool or shareable URL.
  • Double-encoding percent signs or applying component encoding to an entire URL.
  • Treating a convenient preview as validation by the target runtime, parser, database or security control.

Before using the result

  1. Reduce the input to a synthetic example that still reproduces the behavior.
  2. Trace the value through URL construction, proxy handling, framework parsing and one server-side decode.
  3. Add the accepted input and expected output to the project regression tests before release.

Questions to check before production use

Should I encode a full URL?

Usually encode individual query values, not the entire URL.

Is the input uploaded?

No. Encoding runs in the browser.

Independent developer utility. Review output before using it in production.

Detailed developer guide

Encoding, tokens and identifiers: where representation stops and trust begins

Developer incidents often come from assigning security meaning to a representation. This guide separates reversible encoding, random identifiers, cryptographic verification and credential handling.

Read the guide