pipr.tools
Pipes
Clean Email Strip formatting from pasted email for clean plain text Clean AI Output Clean plain text from ChatGPT or AI output Decode & Format JWT Decode a JWT and pretty-print header and payload Word Frequency Count word frequency in text

hash Generate SHA-256 hash

⚡ Gen
Input0 chars
Output0 chars

Examples

Compute SHA-256 hash of a string

Usage
"hello world" | hash

Generate a hash to verify file integrity

Usage
"document-v2-final.pdf" | hash

Create a deterministic ID from order data

Usage
"[email protected]" | hash
View source
async (input)=>{
                const data = new TextEncoder().encode(input);
                const hash = await crypto.subtle.digest("SHA-256", data);
                return Array.from(new Uint8Array(hash)).map((b)=>b.toString(16).padStart(2, "0")).join("");
            }