Technology / utility

URL Encoder / Decoder

Encode and decode a single URL component using native percent-encoding functions, preserving UTF-8 text and handling malformed escapes.

Calculator

Calculator

Encode or decode a URL component.

Use native encodeURIComponent/decodeURIComponent for one component. This does not parse a complete URL or convert form-style plus signs into spaces.

Inputs and options

Your result

Enter details to see the result.

Complete the inputs and calculate to see the main result and its supporting breakdown.

Example

Worked example

Example inputs

Direction
Text → encoded component
Component text
hello world/☕

Calculation breakdown

encodeURIComponent(text) or decodeURIComponent(component).

Example result

Converted component

hello%20world%2F%E2%98%95

Percent-encoded component semantics; plus signs are literal, not form-space encoding.

How to interpret the result

Encoded output escapes component characters and UTF-8 bytes as needed. Decoded output is text, not a parsed or validated destination URL; React renders any markup as ordinary escaped text.

How to use this calculator

  1. Choose component encoding or decoding.
  2. Enter a component value or percent-encoded text.
  3. Convert with native URI-component semantics, retaining literal plus characters.

How it works

Formula

encodeURIComponent(text) or decodeURIComponent(component).

Will a plus sign decode to a space?

No. decodeURIComponent retains a literal +. Form URL encoding has separate plus-as-space semantics that this tool does not silently apply.

What this calculator does

Escape or restore a single URL component while preserving UTF-8 characters and reporting malformed percent escapes.

Inputs you will need

Required or selected inputs

  • Direction
  • Component text

Assumptions

  • The input represents one URL component, such as a query value, rather than a whole URL or form-encoded document.

Limitations

  • Input is bounded to 20,000 characters. Malformed percent escapes and invalid Unicode return errors; literal plus signs are not converted to spaces.

Useful next steps

For a Base64 representation of text instead of URL escaping, use Base64 Encoder / Decoder.

See how HandyChest handles units, validation, rounding, and testing, or Report a problem with this calculator.

Good to know

Frequently asked questions

How should I read the url encoder / decoder result?

Encoded output escapes component characters and UTF-8 bytes as needed. Decoded output is text, not a parsed or validated destination URL; React renders any markup as ordinary escaped text.

Keep going