Skip to content

okeken/jwt-decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Online JWT Decoder - Decode & Verify JSON Web Tokens Instantly

License: MIT

A fast, secure, and easy-to-use Online JWT Decoder tool built purely with HTML, CSS, and JavaScript. Decode JSON Web Tokens (JWTs) directly in your browser without sending data to any server.

Live Demo: Try the JWT Decoder Online

Features

  • Instant Decoding: Paste your JWT and see the decoded Header and Payload immediately.
  • Client-Side Security: All decoding happens locally in your browser. Your tokens are never transmitted or stored.
  • Syntax Highlighting: Uses PrismJS for clear and readable JSON output (Header & Payload).
  • Clear Sections: Displays Header, Payload, and Signature in distinct sections.
  • Copy Functionality: Easily copy the decoded Header, Payload, or the Signature string.
  • Download Option: Download the decoded Header, Payload, and Signature as a single JSON file.
  • Clear Input: Reset the input and output areas with a single click.
  • Responsive Design: Works seamlessly on desktop and mobile devices.
  • Dark Mode Support: Automatically adapts to your system's preferred color scheme.
  • Lightweight & Fast: Built with minimal dependencies for optimal performance.
  • Works Offline: Can be used without an internet connection after the initial load.

Why Use This JWT Decoder?

This tool is perfect for developers who need to quickly inspect the contents of a JSON Web Token without compromising security. Since the decoding is done entirely client-side, it's a safe alternative to online decoders that might log or expose sensitive token data.

Technologies Used

  • HTML5: For structure and semantics.
  • CSS3: For styling, responsiveness, and dark mode.
  • JavaScript (Vanilla): For the core decoding logic, DOM manipulation, and event handling.
  • PrismJS: For beautiful syntax highlighting of JSON data.

How It Works

  1. Paste: Copy your JWT and paste it into the input text area.
  2. Decode: The JavaScript code instantly splits the token into its three parts: Header, Payload, and Signature.
  3. Display:
    • The Header and Payload are Base64Url decoded, parsed as JSON, and displayed with syntax highlighting.
    • The Signature is displayed as is (it cannot be verified client-side without the secret key).
  4. Interact: Use the copy buttons to grab specific parts or the download button to save the decoded content.

Getting Started (Development)

  1. Clone the repository:
    git clone <your-repo-url>
  2. Navigate to the directory:
    cd jwt-decoder-online 
  3. Open index.html in your browser.

No build steps or installations are required!

Contributing

Contributions are welcome! Please feel free to submit a Pull Request or open an Issue for bugs, feature requests, or improvements.

License

This project is licensed under the MIT License - see the LICENSE file (if applicable) for details. (Note: You might want to add a LICENSE file if you intend to distribute this)

About

JWT Decoder Online

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published