Code Snippet Gallery
Copy-paste code examples for common developer tasks. Base64, URL encoding, JSON, regex, and hashing — in every language.
Base64 Encode/Decode in Every Language
16 examplesCopy-paste Base64 encoding and decoding examples for JavaScript, Python, PHP, Go, Java, Rust, C#, Ruby, and more.
URL Encode/Decode in Every Language
15 examplesCopy-paste URL encoding and decoding snippets for JavaScript, Python, PHP, Go, Java, Rust, and more. Handle special characters correctly.
JSON Format, Parse & Validate in Every Language
15 examplesCopy-paste JSON formatting, parsing, validation, and manipulation examples for JavaScript, Python, PHP, Go, Java, and more.
Regex Patterns for Email, IP, URL, Phone & More
15 examplesBattle-tested regular expression patterns for email validation, IP matching, URL extraction, phone numbers, and more. Ready to use in any language.
Hash Functions in Every Language: MD5, SHA256, bcrypt
14 examplesCopy-paste hashing examples: MD5, SHA-1, SHA-256, SHA-512, bcrypt, and HMAC. Ready-to-use code for JavaScript, Python, PHP, Go, Java, and Rust.
Popular Snippets
Base64 Encode a String in JavaScript
Use the built-in btoa() function to encode a UTF-8 string to Base64 in the browser or Node.js.
javascriptBase64 Decode a String in JavaScript
Use atob() to decode Base64 back to a plain string.
javascriptURL Encode in JavaScript
JavaScript provides encodeURIComponent() for query params and encodeURI() for full URLs.
javascriptURL Decode in JavaScript
Decode URL-encoded strings back to readable text.
javascriptPretty-Print JSON in JavaScript
Format JSON with indentation using JSON.stringify().
javascriptMinify JSON in JavaScript
Remove all whitespace from JSON to minimize size.
javascriptEmail Validation Regex
Validate email addresses with a practical regex pattern.
javascriptEmail Validation Regex in Python
Validate and extract emails using Python's re module.
pythonSHA-256 Hash in JavaScript (Browser)
Use the Web Crypto API for SHA-256 hashing in the browser.
javascriptMD5, SHA-256, SHA-512 in Node.js
Use the built-in crypto module for hashing in Node.js.
javascriptLanguages Covered
Try the Online Tools
Each snippet category links to a free, browser-based tool. No signup required.