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

mermaid-render Render Mermaid diagrams as SVG

</> Web
Input0 chars
Output0 chars

Examples

Render a Mermaid flowchart as SVG

Usage
"graph TD
  A[Start] --> B{Decision}
  B -->|Yes| C[Do someth..." | mermaid-render

Visualize a sales pipeline workflow as a diagram

Usage
"graph LR
  Lead --> Qualified
  Qualified --> Proposal
  Pro..." | mermaid-render

Create a user flow decision tree for a product spec

Usage
"graph TD
  A[User visits site] --> B{Logged in?}
  B -->|Yes..." | mermaid-render
View source
async (input)=>{
                if (!input.trim()) return "";
                try {
                    const mermaid = await import('mermaid').then(async (m)=>{
                        await m.__tla;
                        return m;
                    });
                    mermaid.default.initialize({
                        startOnLoad: false,
                        theme: "dark"
                    });
                    const id = `mermaid-pipr-${Date.now()}`;
                    const { svg } = await mermaid.default.render(id, input);
                    return svg;
                } catch (e) {
                    return `Error: ${e.message}`;
                }
            }