Skip to main content

Online Code Parser Tool

Convert your JavaScript code to the format required by different HTTP clients when using Easy Scrape API.

🔧 Postman: Full string escaping

How It Works​

Different HTTP clients have different requirements for sending JavaScript code to the Easy Scrape API:

Client Requirements​

  • Postman, Make.com, Zapier: Require fully escaped strings with \n for line breaks and \" for quotes
  • n8n: Only requires converting double quotes to single quotes - no string escaping needed
  • Base64 (Complex Scripts): Encodes the entire script to Base64 format for scripts with complex content

Conversion Rules​

For Postman, Make.com, Zapier:​

  • All line breaks become \n
  • Double quotes become \"
  • Single quotes become \'
  • Backslashes become \\
  • Entire result wrapped in double quotes

For n8n:​

  • Double quotes become single quotes
  • No other escaping required

For Base64 (Complex Scripts):​

  • Entire JavaScript code is encoded to Base64
  • Preserves all characters exactly as written
  • No escaping or quote conversion needed
  • Use scriptBase64 parameter instead of script
When to Use Base64

Choose Base64 encoding when your script contains:

  • Multiple nested quotes: console.log("He said 'Hello' to me")
  • Template literals with backticks: const html = `<div>${data}</div>`
  • Regular expressions: /[^a-zA-Z0-9]/g
  • Complex string manipulations that break with standard escaping
  • Multi-line formatted code that's hard to escape properly

Usage Tips​

  1. Paste your JavaScript code in the input field
  2. Select your conversion format from the dropdown:
    • Postman/Make/Zapier: For standard HTTP clients that need escaped strings
    • n8n: For the n8n platform that handles code directly
    • Base64: For complex scripts that break with standard escaping
  3. Click Convert to transform the code
  4. Copy the result and use it in your API request

Using Base64 Results​

When you select "Base64 (for complex scripts)", use the result in the scriptBase64 parameter:

{
"url": "https://example.com",
"scriptBase64": "Y29uc29sZS5sb2coIkhlbGxvIHdvcmxkIik7CnJldHVybiB7IG1lc3NhZ2U6ICJIZWxsbyIgfTs="
}

Instead of the regular script parameter:

{
"url": "https://example.com",
"script": "console.log(\"Hello world\"); return { message: \"Hello\" };"
}

This tool ensures your JavaScript code is properly formatted for whichever platform you're using to make API calls to Easy Scrape API.