Guides
Quick, direct answers for specific how-to questions — the pattern, valid and invalid examples, and a tool to try it.
How to Encode Spaces in URLs
%20How to Encode Special Characters in URLs
How to URL Encode JSON
encodeURIComponent(JSON.stringify(value))How to Encode Email Addresses in URLs
%40How to URL Encode UTF-8 Characters
JWT Claims Reference
How to Check if a JWT Is Expired
exp * 1000 < Date.now()Regex for Email
^[\w.+-]+@[\w-]+\.[\w.-]+$Regex for UUID
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$Regex for Phone Number
^\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$Regex for Domains
^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$Regex for URLs
^https?:\/\/[\w.-]+(?:\/[\w\-./?%&=]*)?$JSON Schema for User Registration
{"type":"object","required":["email","password"],"properties":{"email":{"type":"string","format":"email"},"password":{"type":"string","minLength":8}}}JSON Schema for Login Forms
{"required":["password"],"anyOf":[{"required":["email"]},{"required":["username"]}]}JSON Schema for API Requests
{"type":"array","items":{"type":"object","required":["sku","quantity"]},"minItems":1}JSON Schema for Product Catalogs
{"$ref":"#/$defs/money"}URL Encoding in JavaScript
encodeURIComponent(value)URL Encoding in C#
Uri.EscapeDataString(value)URL Encoding in Go
url.QueryEscape(value)How to Parse an ARN
const [, partition, service, region, accountId, ...rest] = arn.split(":");How to Parse an ARN in Python
partition, service, region, account_id, resource = arn.split(":", 5)[1:]How to Parse an ARN in Go
parts := strings.SplitN(arn, ":", 6)How to Parse an ARN in Java
String[] parts = arn.split(":", 6);How to Parse an ARN in C#
string[] parts = arn.Split(':', 6);How to Read docker network inspect Output
{"Name":"myapp_default","Driver":"bridge","IPAM":{"Config":[{"Subnet":"172.19.0.0/16","Gateway":"172.19.0.1"}]},"Internal":false,"Containers":{"<id>":{"Name":"myapp-web-1","IPv4Address":"172.19.0.3/16"}}}How to Hash Passwords in Node.js
const hash = await argon2.hash(password);How to Hash Passwords in Python
hash = PasswordHasher().hash(password)How to Hash Passwords in Java
Argon2Factory.create(Argon2Factory.Argon2Types.ARGON2id)How to Write an S3 Bucket Policy
{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":"*","Action":"s3:GetObject","Resource":"arn:aws:s3:::my-bucket/*"}]}How to Write a Multi-Stage Dockerfile
FROM golang:1.23 AS builder ... FROM scratch COPY --from=builder /app /appJSON Schema for Payment Requests
{"oneOf":[{"properties":{"type":{"const":"card"}}},{"properties":{"type":{"const":"bank_transfer"}}}]}JSON Schema for Blog Posts
{"if":{"properties":{"status":{"const":"published"}}},"then":{"required":["publishedAt"]},"else":{"not":{"required":["publishedAt"]}}}