URL Encoder / Decoder

system online

Developer Utility

URL Encoder and Decoder Online - Encode URL Components

Encode and decode URL components or complete URLs with JavaScript's standard URI functions. Validate malformed escapes and copy converted text.

URL Encoder / Decoder

Encode or decode text and URLs locally in your browser. Choose whether to preserve URL structure or encode every component character.

Encoding scope

Your input is processed only in this browser.

Use URL component mode for individual query values. Use Full URL mode to encode or decode a complete URL while preserving its structural delimiters.

Convert text and URLs with separate Encode and Decode actions. Choose URL component mode to escape reserved characters, or full URL mode to preserve URL separators and structure.

The tool uses JavaScript's built-in encodeURIComponent, encodeURI, decodeURIComponent, and decodeURI functions. All conversion runs locally in your browser.

How to Use This Tool

  1. Paste text or a URL into the input editor, or load the sample URL.
  2. Choose URL component mode for a query value or Full URL mode for a complete URL.
  3. Select Encode or Decode to convert the input.
  4. Copy the result, swap it back into the input, or clear the editors.

Full URL Encoding vs URL Component Encoding

encodeURI and decodeURI are intended for a complete URI. They preserve characters that have structural meaning in URLs, such as slashes, question marks, ampersands, and equals signs.

encodeURIComponent and decodeURIComponent are intended for individual values, such as a query parameter. They escape those reserved characters so the value cannot accidentally change the surrounding URL structure.

Handling Invalid Percent-Encoding

A percent-encoded sequence starts with % followed by exactly two hexadecimal digits. Decoding also validates UTF-8 sequences, so truncated, malformed, or invalidly encoded input produces a clear error instead of an incorrect result.

Encode or decode only once for each corresponding step. Double encoding changes percent signs into encoded text and can require more than one decoding pass to restore the original value.

Frequently Asked Questions

Should I use encodeURI or encodeURIComponent?

Use encodeURI for a complete URL whose separators should remain intact. Use encodeURIComponent for individual query values or other URL components.

Does this tool preserve URL delimiters?

Full URL mode preserves URL delimiters. Component mode encodes reserved characters, including delimiters.

Is the input sent to a server?

No. URI encoding and decoding happen in your browser using built-in JavaScript functions.

Related Developer Tools

These tools are commonly used alongside this one.