Skip to main content

Encoding/Decoding Utility CLI - base64, hex, URL, HTML, hashing, JWT decoding

Project description

encutil

Encoding/Decoding Utility CLI - encode and decode base64, hex, URL, HTML entities, hash strings/files, and decode JWTs.

Installation

pip install encutil

Usage

All commands accept input as an argument, from -f FILE, or from stdin.

Base64

encutil b64e "hello world"           # SGVsbG8gV29ybGQ=
encutil b64d "SGVsbG8gV29ybGQ="       # hello world
echo "secret" | encutil b64e         # c2VjcmV0Cg==

Hex

encutil hex "hello"                  # 68656c6c6f
encutil unhex "68656c6c6f"           # hello

URL Encoding

encutil url "hello world"            # hello%20world
encutil unurl "hello%20world"        # hello world
encutil url "key=value&foo=bar"      # key%3Dvalue%26foo%3Dbar

HTML Entities

encutil html "<script>alert('xss')</script>"
# &lt;script&gt;alert(&#x27;xss&#x27;)&lt;/script&gt;

encutil unhtml "&lt;script&gt;"      # <script>

Hashing

encutil hash sha256 "password"       # 5e884898da28...
encutil hash md5 "text"              # 1cb251ec0d56...
encutil hashfile sha256 myfile.txt   # Hash a file

Supported algorithms: md5, sha1, sha256, sha512, sha224, sha384

JWT Decoding

Decode JWT tokens without verification (extracts header and payload):

encutil jwt "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"

# Header:
# {
#   "alg": "HS256",
#   "typ": "JWT"
# }
#
# Payload:
# {
#   "sub": "1234567890",
#   "name": "John Doe",
#   "iat": 1516239022
# }

Auto-Detect Encoding

Try multiple decodings and show what works:

encutil detect "SGVsbG8gV29ybGQ="

# BASE64:
# Hello World

JSON Output

All commands support --json for machine-readable output:

encutil b64e "hello" --json          # {"base64": "aGVsbG8="}
encutil hash sha256 "test" --json    # {"algorithm": "sha256", "hash": "9f86d08..."}

File Input

Read from file with -f:

encutil b64e -f secret.txt
encutil hashfile sha256 myfile.bin

For AI Agents

See SKILL.md for AI-agent-friendly documentation.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

encutil-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

encutil-0.1.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file encutil-0.1.0.tar.gz.

File metadata

  • Download URL: encutil-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for encutil-0.1.0.tar.gz
Algorithm Hash digest
SHA256 007ae097af3ad36a431d75a3267fab8b09fe37043e4178b03477dd8c8e8c0ecf
MD5 32a1ffcfe9423e2dcf49aca0825e5669
BLAKE2b-256 9e3a47d1d27d7df43e2467ac0eb9feef455a5052e6b4345fd324ad792e255262

See more details on using hashes here.

File details

Details for the file encutil-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: encutil-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for encutil-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b4e17e15d5fd9bd0f3248277066f69881db8a05f24165794ccbc5394e4004c0
MD5 e6d4a7b15cfae189bdec48b95448bdc6
BLAKE2b-256 22bbba2317820f92ba087387ae365c532e823396d00762dca22ec577edc9365e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page