URL Encoder/Decoder

URL Preview

URL Encoding Guide

When to Use Each Encoding Method

  • encodeURI()

    Use for encoding complete URLs. Preserves URL special characters like /, ?, :, @, &, =, +, $, #

    https://example.com/path with spaces/
    → https://example.com/path%20with%20spaces/
  • encodeURIComponent()

    Use for encoding URL parameters. Encodes all special characters including /, ?, :, @, &, =, +, $, #

    user@example.com
    → user%40example.com

Common URL-Encoded Characters

  • Space → %20
    # → %23
    % → %25
    & → %26
    = → %3D
    ? → %3F