{
  "openapi": "3.1.0",
  "info": {
    "title": ".tools API",
    "description": "Programmatic access to all dot.tools developer utilities. Every client-side tool is also available as an API endpoint.",
    "version": "1.0.0",
    "contact": {
      "name": ".tools",
      "url": "https://dot.tools"
    }
  },
  "servers": [
    {
      "url": "https://dot.tools",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/tools/base64": {
      "post": {
        "operationId": "base64",
        "summary": "Base64 Encode/Decode",
        "description": "Encode and decode Base64 strings online. Supports UTF-8 text and binary data. Fast, secure, client-side processing.",
        "tags": [
          "Encode & Cipher"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "encode",
                      "decode"
                    ],
                    "description": "Whether to encode raw text to Base64 or decode Base64 back to text."
                  },
                  "input": {
                    "type": "string",
                    "description": "The raw text to encode, or the Base64 string to decode."
                  }
                },
                "required": [
                  "mode",
                  "input"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "output": {
                          "type": "string",
                          "description": "The encoded Base64 string, or the decoded raw text."
                        }
                      },
                      "required": [
                        "output"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/case-converter": {
      "post": {
        "operationId": "case-converter",
        "summary": "Case Converter",
        "description": "Convert case online: camelCase, PascalCase, snake_case, SCREAMING_SNAKE_CASE, kebab-case, Title Case and more. Smart acronym and digit splitting. Free, instant, no sign-up.",
        "tags": [
          "Format & Parse"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "maxLength": 100000,
                    "description": "The text to convert, in any mix of camelCase, PascalCase, snake_case, kebab-case or plain words."
                  },
                  "target": {
                    "type": "string",
                    "enum": [
                      "camel",
                      "pascal",
                      "snake",
                      "screaming-snake",
                      "kebab",
                      "lower",
                      "upper",
                      "title"
                    ],
                    "description": "Target case: camel (camelCase), pascal (PascalCase), snake (snake_case), screaming-snake (SCREAMING_SNAKE_CASE), kebab (kebab-case), lower (lower case), upper (UPPER CASE) or title (Title Case)."
                  }
                },
                "required": [
                  "text",
                  "target"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "string",
                          "description": "The converted text. Empty when the input contains no letters or digits."
                        }
                      },
                      "required": [
                        "result"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/color-space": {
      "post": {
        "operationId": "color-space",
        "summary": "Color Space Converter",
        "description": "Convert PNG, JPEG, and WebP images between sRGB, Display P3, Linear sRGB, Adobe RGB, and Rec. 2020 in your browser. Auto-detects source color space and writes correctly tagged output in any supported format.",
        "tags": [
          "Image Tools"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "imageBase64": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40000000,
                    "description": "Base64-encoded PNG, JPEG, or WebP image. A data-URL prefix (data:image/...;base64,) is accepted and stripped."
                  }
                },
                "required": [
                  "imageBase64"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "format": {
                          "type": "string",
                          "enum": [
                            "png",
                            "jpeg",
                            "webp",
                            "unknown"
                          ]
                        },
                        "detected": {
                          "type": "object",
                          "properties": {
                            "space": {
                              "type": "string",
                              "enum": [
                                "srgb",
                                "display-p3",
                                "linear-srgb",
                                "adobe-rgb",
                                "rec2020"
                              ]
                            },
                            "reason": {
                              "type": "string"
                            },
                            "assumed": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "space",
                            "reason",
                            "assumed"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "format",
                        "detected"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/color-converter": {
      "post": {
        "operationId": "color-converter",
        "summary": "Color Converter",
        "description": "Convert color codes between HEX, RGB, HSL, HWB and OKLCH. CSS keyword and Tailwind v3 matching, WCAG contrast ratios. Free, instant, no sign-up.",
        "tags": [
          "Format & Parse"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "color": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Color in any sRGB notation: #rgb/#rgba/#rrggbb/#rrggbbaa, rgb()/rgba(), hsl()/hsla(), hwb() (comma or space/slash syntax), or a CSS color keyword. OKLCH input is not accepted (out-of-gamut mapping), but OKLCH output is always provided."
                  }
                },
                "required": [
                  "color"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "hex": {
                          "type": "string",
                          "description": "Lowercase hex, 8 digits when alpha < 1 (e.g. #8b5cf6 or #8b5cf680)."
                        },
                        "rgb": {
                          "type": "object",
                          "properties": {
                            "r": {
                              "type": "number",
                              "description": "Red channel, 0–255."
                            },
                            "g": {
                              "type": "number",
                              "description": "Green channel, 0–255."
                            },
                            "b": {
                              "type": "number",
                              "description": "Blue channel, 0–255."
                            },
                            "a": {
                              "type": "number",
                              "description": "Alpha, 0–1."
                            }
                          },
                          "required": [
                            "r",
                            "g",
                            "b",
                            "a"
                          ],
                          "additionalProperties": false
                        },
                        "hsl": {
                          "type": "object",
                          "properties": {
                            "h": {
                              "type": "number",
                              "description": "Hue in degrees, 0–360, 1 decimal."
                            },
                            "s": {
                              "type": "number",
                              "description": "Saturation percentage, 1 decimal."
                            },
                            "l": {
                              "type": "number",
                              "description": "Lightness percentage, 1 decimal."
                            },
                            "a": {
                              "type": "number",
                              "description": "Alpha, 0–1."
                            }
                          },
                          "required": [
                            "h",
                            "s",
                            "l",
                            "a"
                          ],
                          "additionalProperties": false
                        },
                        "hwb": {
                          "type": "object",
                          "properties": {
                            "h": {
                              "type": "number",
                              "description": "Hue in degrees, 0–360, 1 decimal."
                            },
                            "w": {
                              "type": "number",
                              "description": "Whiteness percentage, 1 decimal."
                            },
                            "b": {
                              "type": "number",
                              "description": "Blackness percentage, 1 decimal."
                            },
                            "a": {
                              "type": "number",
                              "description": "Alpha, 0–1."
                            }
                          },
                          "required": [
                            "h",
                            "w",
                            "b",
                            "a"
                          ],
                          "additionalProperties": false
                        },
                        "oklch": {
                          "type": "object",
                          "properties": {
                            "l": {
                              "type": "number",
                              "description": "OKLCH lightness, 0–1, 4 decimals."
                            },
                            "c": {
                              "type": "number",
                              "description": "OKLCH chroma, 4 decimals."
                            },
                            "h": {
                              "type": "number",
                              "description": "OKLCH hue in degrees, 2 decimals (0 for near-achromatic colors)."
                            },
                            "a": {
                              "type": "number",
                              "description": "Alpha, 0–1."
                            }
                          },
                          "required": [
                            "l",
                            "c",
                            "h",
                            "a"
                          ],
                          "additionalProperties": false
                        },
                        "keyword": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "CSS keyword when the RGB channels exactly equal a named color, else null."
                        },
                        "tailwind": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Tailwind v3 palette name, e.g. violet-500."
                                },
                                "hex": {
                                  "type": "string",
                                  "description": "Palette color as hex."
                                },
                                "distance": {
                                  "type": "number",
                                  "description": "OKLab euclidean distance to the palette color."
                                }
                              },
                              "required": [
                                "name",
                                "hex",
                                "distance"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Nearest Tailwind v3 palette color, or null when the nearest match is farther than 0.1 OKLab units."
                        },
                        "contrastOnWhite": {
                          "type": "number",
                          "description": "WCAG contrast ratio against pure white, compositing alpha over white first. 2 decimals."
                        },
                        "contrastOnBlack": {
                          "type": "number",
                          "description": "WCAG contrast ratio against pure black, compositing alpha over black first. 2 decimals."
                        }
                      },
                      "required": [
                        "hex",
                        "rgb",
                        "hsl",
                        "hwb",
                        "oklch",
                        "keyword",
                        "tailwind",
                        "contrastOnWhite",
                        "contrastOnBlack"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/contrast-checker": {
      "post": {
        "operationId": "contrast-checker",
        "summary": "Color Contrast Checker",
        "description": "Check color contrast against WCAG 2.x AA and AAA thresholds. Live preview, exact ratio, and pass/fail for normal text, large text and UI components. Free, instant.",
        "tags": [
          "Format & Parse"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "foreground": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Foreground (text/icon) color. Opaque color as #rgb/#rrggbb, rgb(), hsl(), hwb() or a CSS keyword (e.g. rebeccapurple). Colors with alpha below 1 are rejected — WCAG contrast is defined for opaque colors only."
                  },
                  "background": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Background color. Opaque color as #rgb/#rrggbb, rgb(), hsl(), hwb() or a CSS keyword (e.g. rebeccapurple). Colors with alpha below 1 are rejected — WCAG contrast is defined for opaque colors only."
                  }
                },
                "required": [
                  "foreground",
                  "background"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "ratio": {
                          "type": "number",
                          "description": "Unrounded WCAG contrast ratio, 1–21. Round to 2 decimals for display only — thresholds are evaluated on this exact value."
                        },
                        "aa_normal": {
                          "type": "boolean",
                          "description": "WCAG AA for normal text (ratio >= 4.5)."
                        },
                        "aa_large": {
                          "type": "boolean",
                          "description": "WCAG AA for large text (ratio >= 3.0). Large text is >= 18pt/24px regular or >= 14pt/18.66px bold."
                        },
                        "aaa_normal": {
                          "type": "boolean",
                          "description": "WCAG AAA for normal text (ratio >= 7.0)."
                        },
                        "aaa_large": {
                          "type": "boolean",
                          "description": "WCAG AAA for large text (ratio >= 4.5)."
                        },
                        "non_text_aa": {
                          "type": "boolean",
                          "description": "WCAG 1.4.11 non-text/UI components (ratio >= 3.0)."
                        }
                      },
                      "required": [
                        "ratio",
                        "aa_normal",
                        "aa_large",
                        "aaa_normal",
                        "aaa_large",
                        "non_text_aa"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/cron-parser": {
      "post": {
        "operationId": "cron-parser",
        "summary": "Cron Parser",
        "description": "Parse cron expressions into plain English. See next run times, field-by-field breakdowns, and clear validation errors. 100% client-side.",
        "tags": [
          "Format & Parse"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "expression": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "A standard 5-field cron expression: minute hour day-of-month month day-of-week. Supports *, lists, ranges, steps, and month/weekday names."
                  },
                  "count": {
                    "default": 5,
                    "description": "How many upcoming execution times to compute (max 10).",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10
                  },
                  "from": {
                    "description": "ISO-8601 start time for the next-execution preview. Defaults to now. Computed in UTC.",
                    "type": "string",
                    "maxLength": 64
                  }
                },
                "required": [
                  "expression",
                  "count"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "valid": {
                          "type": "boolean",
                          "description": "Whether the expression parsed successfully."
                        },
                        "error": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Specific validation error when invalid."
                        },
                        "expression": {
                          "type": "string",
                          "description": "The normalized input expression."
                        },
                        "description": {
                          "type": "string",
                          "description": "Human-readable summary, e.g. \"At 09:00 on weekdays\"."
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string",
                                "description": "Field key (minute, hour, dayOfMonth, month, dayOfWeek)."
                              },
                              "label": {
                                "type": "string",
                                "description": "Human-readable field label."
                              },
                              "raw": {
                                "type": "string",
                                "description": "Raw field text as entered."
                              },
                              "values": {
                                "type": "array",
                                "items": {
                                  "type": "number"
                                },
                                "description": "Expanded set of allowed values."
                              },
                              "description": {
                                "type": "string",
                                "description": "Per-field explanation."
                              }
                            },
                            "required": [
                              "field",
                              "label",
                              "raw",
                              "values",
                              "description"
                            ],
                            "additionalProperties": false
                          },
                          "description": "Field-by-field breakdown."
                        },
                        "next": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Upcoming execution times as ISO-8601 UTC strings."
                        }
                      },
                      "required": [
                        "valid",
                        "error",
                        "expression",
                        "description",
                        "fields",
                        "next"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/diff-checker": {
      "post": {
        "operationId": "diff-checker",
        "summary": "Diff Checker",
        "description": "Compare two texts or JSON documents online and see every change highlighted line by line. Whitespace-insensitive and key-sorted JSON modes. Free and instant.",
        "tags": [
          "Format & Parse"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "text",
                      "json"
                    ],
                    "description": "Compare raw text line-by-line, or parse both sides as JSON first (semantic compare)."
                  },
                  "a": {
                    "type": "string",
                    "maxLength": 1000000,
                    "description": "Original (old) content."
                  },
                  "b": {
                    "type": "string",
                    "maxLength": 1000000,
                    "description": "Changed (new) content."
                  },
                  "ignoreWhitespace": {
                    "type": "boolean",
                    "description": "Ignore leading/trailing whitespace on each line when comparing (jsdiff ignoreWhitespace semantics)."
                  },
                  "sortKeys": {
                    "type": "boolean",
                    "description": "JSON mode only: recursively sort object keys before comparing, so pure key-order differences produce no diff. Arrays keep their order."
                  }
                },
                "required": [
                  "mode",
                  "a",
                  "b",
                  "ignoreWhitespace",
                  "sortKeys"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "rows": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "added",
                                  "removed",
                                  "context"
                                ],
                                "description": "Line kind: only in B (added), only in A (removed), or in both (context)."
                              },
                              "text": {
                                "type": "string",
                                "description": "Line content without the trailing newline."
                              },
                              "oldLine": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "1-based line number in A for removed/context rows, null for added rows."
                              },
                              "newLine": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "1-based line number in B for added/context rows, null for removed rows."
                              }
                            },
                            "required": [
                              "type",
                              "text",
                              "oldLine",
                              "newLine"
                            ],
                            "additionalProperties": false
                          },
                          "description": "Per-line diff rows in display order. Empty when error is set."
                        },
                        "stats": {
                          "type": "object",
                          "properties": {
                            "added": {
                              "type": "number",
                              "description": "Lines only in B."
                            },
                            "removed": {
                              "type": "number",
                              "description": "Lines only in A. A modified line counts as 1 removed + 1 added."
                            },
                            "unchanged": {
                              "type": "number",
                              "description": "Lines identical in both."
                            }
                          },
                          "required": [
                            "added",
                            "removed",
                            "unchanged"
                          ],
                          "additionalProperties": false,
                          "description": "Diff tallies."
                        },
                        "error": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Error message when the diff could not be computed (JSON parse failure or inputs too different)."
                        },
                        "errorSide": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "a",
                                "b"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Which input failed JSON parsing, when applicable."
                        },
                        "errorLine": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "1-based line of the JSON parse error, when applicable."
                        },
                        "errorColumn": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "1-based column of the JSON parse error, when applicable."
                        }
                      },
                      "required": [
                        "rows",
                        "stats",
                        "error",
                        "errorSide",
                        "errorLine",
                        "errorColumn"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/csv-json": {
      "post": {
        "operationId": "csv-json",
        "summary": "CSV ↔ JSON Converter",
        "description": "Convert CSV to JSON and JSON to CSV online. Handles quoted fields, Excel semicolon exports and ragged rows. Free, fast, no sign-up.",
        "tags": [
          "Format & Parse"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "csv-to-json",
                      "json-to-csv"
                    ],
                    "description": "Conversion direction: CSV to JSON, or JSON to CSV."
                  },
                  "input": {
                    "type": "string",
                    "maxLength": 1000000,
                    "description": "The CSV or JSON text to convert (max 1 MB)."
                  },
                  "delimiter": {
                    "type": "string",
                    "enum": [
                      ",",
                      ";",
                      "tab",
                      "auto"
                    ],
                    "description": "Field delimiter. \"auto\" sniffs the first 10 records when converting CSV to JSON, and resolves to a comma when converting JSON to CSV."
                  },
                  "hasHeader": {
                    "type": "boolean",
                    "description": "CSV → JSON only: treat the first row as object keys. When false, rows convert to arrays of strings."
                  },
                  "indent": {
                    "type": "string",
                    "enum": [
                      "2",
                      "4"
                    ],
                    "description": "CSV → JSON only: number of spaces per indentation level in the JSON output."
                  }
                },
                "required": [
                  "mode",
                  "input",
                  "delimiter",
                  "hasHeader",
                  "indent"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "output": {
                          "type": "string",
                          "description": "The converted document. Empty when the input is empty or invalid."
                        },
                        "valid": {
                          "type": "boolean",
                          "description": "Whether the input parsed successfully."
                        },
                        "error": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Parse error message when invalid."
                        },
                        "errorLine": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "1-based physical line of the parse error when invalid."
                        },
                        "errorColumn": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "1-based column of the parse error when invalid (JSON input only)."
                        }
                      },
                      "required": [
                        "output",
                        "valid",
                        "error",
                        "errorLine",
                        "errorColumn"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/grep": {
      "post": {
        "operationId": "grep",
        "summary": "Grep Pattern Tester",
        "description": "Test exact strings or regex patterns against any input text. Live filtering with match highlighting, context lines, and invert match. 100% client-side.",
        "tags": [
          "Format & Parse"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "The input text to search through."
                  },
                  "pattern": {
                    "type": "string",
                    "description": "The search pattern — either a literal string or a regular expression."
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "exact",
                      "regex"
                    ],
                    "description": "Whether the pattern is a literal string or a regex."
                  },
                  "position": {
                    "type": "string",
                    "enum": [
                      "contains",
                      "prefix",
                      "suffix",
                      "exact"
                    ],
                    "description": "Match position for exact mode: contains, prefix, suffix, or exact match."
                  },
                  "caseInsensitive": {
                    "type": "boolean",
                    "description": "Ignore letter case when matching."
                  },
                  "wholeWord": {
                    "type": "boolean",
                    "description": "Match complete words only, not substrings."
                  },
                  "invertMatch": {
                    "type": "boolean",
                    "description": "Return non-matching lines instead of matching lines."
                  },
                  "keepBlankLines": {
                    "type": "boolean",
                    "description": "Preserve empty lines in results."
                  },
                  "maxHits": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 10000,
                    "description": "Maximum number of match results to return."
                  },
                  "linesBefore": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 50,
                    "description": "Number of context lines before each match."
                  },
                  "linesAfter": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 50,
                    "description": "Number of context lines after each match."
                  },
                  "trimWhitespace": {
                    "type": "boolean",
                    "description": "Remove leading/trailing whitespace from lines."
                  },
                  "flags": {
                    "type": "object",
                    "properties": {
                      "global": {
                        "type": "boolean"
                      },
                      "multiline": {
                        "type": "boolean"
                      },
                      "dotall": {
                        "type": "boolean"
                      },
                      "unicode": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "global",
                      "multiline",
                      "dotall",
                      "unicode"
                    ],
                    "additionalProperties": false,
                    "description": "Regex flags (only used in regex mode)."
                  }
                },
                "required": [
                  "text",
                  "pattern",
                  "mode",
                  "position",
                  "caseInsensitive",
                  "wholeWord",
                  "invertMatch",
                  "keepBlankLines",
                  "maxHits",
                  "linesBefore",
                  "linesAfter",
                  "trimWhitespace",
                  "flags"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "matches": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "line": {
                                "type": "number",
                                "description": "1-based line number."
                              },
                              "text": {
                                "type": "string",
                                "description": "Line content."
                              },
                              "ranges": {
                                "type": "array",
                                "items": {
                                  "type": "array",
                                  "prefixItems": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "number"
                                    }
                                  ]
                                },
                                "description": "Match ranges [start, end] for highlighting."
                              }
                            },
                            "required": [
                              "line",
                              "text",
                              "ranges"
                            ],
                            "additionalProperties": false
                          },
                          "description": "Matched lines with highlight ranges."
                        },
                        "totalLines": {
                          "type": "number",
                          "description": "Total number of lines in input."
                        },
                        "matchCount": {
                          "type": "number",
                          "description": "Number of matched lines."
                        },
                        "nonMatchCount": {
                          "type": "number",
                          "description": "Number of non-matched lines."
                        }
                      },
                      "required": [
                        "matches",
                        "totalLines",
                        "matchCount",
                        "nonMatchCount"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/har-viewer": {
      "post": {
        "operationId": "har-viewer",
        "summary": "HAR File Inspector",
        "description": "Open HAR files online: inspect network requests, analyze failures, detect slow responses, redact secrets, and export sanitized bug reports. 100% client-side.",
        "tags": [
          "Web & Network"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "harText": {
                    "type": "string",
                    "description": "The raw HAR JSON text."
                  },
                  "sanitize": {
                    "description": "Whether to return a sanitized HAR copy in addition to the analysis.",
                    "type": "boolean"
                  },
                  "sanitizeOptions": {
                    "description": "Sanitization options.",
                    "type": "object",
                    "properties": {
                      "redactCookies": {
                        "description": "Redact cookie values from Cookie and Set-Cookie data.",
                        "type": "boolean"
                      },
                      "redactHeaders": {
                        "description": "Redact authorization, token, API key, and secret-looking headers.",
                        "type": "boolean"
                      },
                      "redactQueryParams": {
                        "description": "Redact sensitive query parameters from URLs and queryString arrays.",
                        "type": "boolean"
                      },
                      "redactPostData": {
                        "description": "Redact sensitive JSON/form/request body fields.",
                        "type": "boolean"
                      },
                      "stripResponseContent": {
                        "description": "Remove captured response body text from the sanitized HAR.",
                        "type": "boolean"
                      },
                      "stripRequestBodies": {
                        "description": "Remove captured request bodies from the sanitized HAR.",
                        "type": "boolean"
                      },
                      "redactLocalIps": {
                        "description": "Redact localhost, private IPs, and .local/.internal hostnames.",
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "required": [
                  "harText"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "analysis": {
                          "description": "Parsed HAR summary, request rows, diagnostics, and metadata."
                        },
                        "sanitizedHar": {
                          "description": "Sanitized HAR object, if requested."
                        },
                        "redactionReport": {
                          "description": "Redaction counts and sample paths, if sanitization was requested."
                        },
                        "markdownReport": {
                          "description": "Markdown bug report summary.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "analysis"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/hash-calc": {
      "post": {
        "operationId": "hash-calc",
        "summary": "Hash Calculator",
        "description": "Calculate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes online. Hash text or files securely in your browser — nothing is uploaded.",
        "tags": [
          "Encode & Cipher"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "maxLength": 5000000,
                    "description": "The UTF-8 text to hash with all supported algorithms."
                  }
                },
                "required": [
                  "text"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "md5": {
                          "type": "string",
                          "description": "MD5 hash (hex) of the input."
                        },
                        "sha1": {
                          "type": "string",
                          "description": "SHA-1 hash (hex) of the input."
                        },
                        "sha256": {
                          "type": "string",
                          "description": "SHA-256 hash (hex) of the input."
                        },
                        "sha384": {
                          "type": "string",
                          "description": "SHA-384 hash (hex) of the input."
                        },
                        "sha512": {
                          "type": "string",
                          "description": "SHA-512 hash (hex) of the input."
                        }
                      },
                      "required": [
                        "md5",
                        "sha1",
                        "sha256",
                        "sha384",
                        "sha512"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/html-entities": {
      "post": {
        "operationId": "html-entities",
        "summary": "HTML Entity Encoder/Decoder",
        "description": "Encode and decode HTML entities online. Escape & < > quotes, optionally encode non-ASCII as numeric references — free and client-side.",
        "tags": [
          "Encode & Cipher"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "maxLength": 512000,
                    "description": "The text to entity-encode, or the entity-encoded string to decode."
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "encode",
                      "decode"
                    ],
                    "description": "Whether to encode plain text into HTML entities or decode entities back to text."
                  },
                  "encodeNonAscii": {
                    "description": "Encode mode only: also escape non-ASCII characters as hexadecimal numeric references (e.g. 😀 becomes &#x1F600;).",
                    "type": "boolean"
                  }
                },
                "required": [
                  "text",
                  "mode"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "string",
                          "description": "The entity-encoded or decoded result."
                        }
                      },
                      "required": [
                        "result"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/json-escape": {
      "post": {
        "operationId": "json-escape",
        "summary": "JSON Escape / Unescape",
        "description": "Escape text for JSON strings and unescape JSON string contents online. Handles quotes, newlines, tabs and unicode — free, client-side.",
        "tags": [
          "Encode & Cipher"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "maxLength": 512000,
                    "description": "The raw text to escape, or the JSON-escaped string to unescape."
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "escape",
                      "unescape"
                    ],
                    "description": "Whether to escape raw text for embedding in a JSON string or unescape a JSON string back to raw text."
                  },
                  "includeQuotes": {
                    "description": "Escape mode only: include the surrounding double quotes in the output (default false).",
                    "type": "boolean"
                  }
                },
                "required": [
                  "text",
                  "mode"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "string",
                          "description": "The escaped or unescaped result."
                        }
                      },
                      "required": [
                        "result"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/json-formatter": {
      "post": {
        "operationId": "json-formatter",
        "summary": "JSON Formatter",
        "description": "Format, beautify, minify, and validate JSON online. Custom indentation, key sorting, and precise error locations. 100% client-side — your data never leaves your browser.",
        "tags": [
          "Format & Parse"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "beautify",
                      "minify",
                      "validate"
                    ],
                    "description": "Beautify with indentation, minify to a single line, or validate only."
                  },
                  "input": {
                    "type": "string",
                    "description": "The JSON text to format, minify, or validate."
                  },
                  "indent": {
                    "type": "string",
                    "enum": [
                      "2",
                      "4",
                      "tab"
                    ],
                    "description": "Indentation used when beautifying: 2 spaces, 4 spaces, or tabs."
                  },
                  "sortKeys": {
                    "type": "boolean",
                    "description": "Sort object keys alphabetically (recursively) before output."
                  }
                },
                "required": [
                  "mode",
                  "input",
                  "indent",
                  "sortKeys"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "output": {
                          "type": "string",
                          "description": "The formatted JSON, or the original input in validate mode. Empty when invalid."
                        },
                        "valid": {
                          "type": "boolean",
                          "description": "Whether the input is valid JSON."
                        },
                        "error": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Parse error message when invalid."
                        },
                        "errorLine": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "1-based line of the parse error when invalid."
                        },
                        "errorColumn": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "1-based column of the parse error when invalid."
                        }
                      },
                      "required": [
                        "output",
                        "valid",
                        "error",
                        "errorLine",
                        "errorColumn"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/json-schema": {
      "post": {
        "operationId": "json-schema",
        "summary": "JSON Schema",
        "description": "Validate JSON against a JSON Schema or generate a draft 2020-12 schema from sample data. Detailed error paths, format detection, free and browser-based.",
        "tags": [
          "Format & Parse"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "validate",
                      "generate"
                    ],
                    "description": "validate: check an instance against a schema. generate: infer a draft 2020-12 schema from a sample document."
                  },
                  "instance": {
                    "type": "string",
                    "maxLength": 5242880,
                    "description": "The JSON document to validate (max 1 MB in validate mode) or to infer a schema from (max 5 MB in generate mode)."
                  },
                  "schema": {
                    "description": "Required in validate mode: the JSON Schema (draft 2020-12) as JSON text, max 1 MB. Local $refs only; remote refs are never fetched.",
                    "type": "string",
                    "maxLength": 1048576
                  }
                },
                "required": [
                  "mode",
                  "instance"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "mode": {
                          "type": "string",
                          "enum": [
                            "validate",
                            "generate"
                          ],
                          "description": "The mode that was executed."
                        },
                        "valid": {
                          "anyOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Validate mode: whether the instance conforms. format-keyword failures do not affect this."
                        },
                        "schemaError": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Validate mode: why the schema itself could not be used (invalid JSON, uncompilable, unresolved remote $ref)."
                        },
                        "errors": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "instancePath": {
                                "type": "string",
                                "description": "JSON Pointer to the offending value; empty string is the document root."
                              },
                              "keyword": {
                                "type": "string",
                                "description": "The JSON Schema keyword that failed (e.g. type, required, enum)."
                              },
                              "message": {
                                "type": "string",
                                "description": "Human-readable description of the violation."
                              }
                            },
                            "required": [
                              "instancePath",
                              "keyword",
                              "message"
                            ],
                            "additionalProperties": false
                          },
                          "description": "Validate mode: instance-validation errors, capped at 100 entries."
                        },
                        "errorCount": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Validate mode: total instance-validation errors before the cap."
                        },
                        "formatWarnings": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "instancePath": {
                                "type": "string",
                                "description": "JSON Pointer to the value that failed the format check."
                              },
                              "format": {
                                "type": "string",
                                "description": "The format that was asserted (e.g. email, date-time, uuid, uri)."
                              },
                              "message": {
                                "type": "string",
                                "description": "Human-readable description of the format mismatch."
                              }
                            },
                            "required": [
                              "instancePath",
                              "format",
                              "message"
                            ],
                            "additionalProperties": false
                          },
                          "description": "Validate mode: format-keyword failures, reported as annotations only (capped at 100)."
                        },
                        "schema": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Generate mode: the inferred draft 2020-12 schema, pretty-printed."
                        }
                      },
                      "required": [
                        "mode",
                        "valid",
                        "schemaError",
                        "errors",
                        "errorCount",
                        "formatWarnings",
                        "schema"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/json-to-typescript": {
      "post": {
        "operationId": "json-to-typescript",
        "summary": "JSON to TypeScript",
        "description": "Turn any JSON payload into TypeScript interfaces online. Merges array item shapes, marks missing keys optional and dedupes identical structures. Free, no sign-up.",
        "tags": [
          "Format & Parse"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "json": {
                    "type": "string",
                    "maxLength": 5242880,
                    "description": "The JSON document to generate TypeScript types for (max 5 MB)."
                  },
                  "rootName": {
                    "default": "Root",
                    "description": "Name for the root interface or type alias. Sanitized to PascalCase and must form a valid TypeScript identifier.",
                    "type": "string"
                  },
                  "exportKeyword": {
                    "default": true,
                    "description": "Prefix every declaration with the export keyword.",
                    "type": "boolean"
                  },
                  "optionalWhenMissing": {
                    "default": true,
                    "description": "Mark fields missing from some array items as optional (?). When false, they stay required with undefined added to the type union.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "json",
                  "rootName",
                  "exportKeyword",
                  "optionalWhenMissing"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "typescript": {
                          "type": "string",
                          "description": "The generated TypeScript declarations."
                        },
                        "interfaceCount": {
                          "type": "number",
                          "description": "Number of named interfaces emitted (excludes a root type alias)."
                        }
                      },
                      "required": [
                        "typescript",
                        "interfaceCount"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/xml-formatter": {
      "post": {
        "operationId": "xml-formatter",
        "summary": "XML Formatter",
        "description": "Format, beautify, minify, and validate XML online. Proper indentation, clear error detection with line numbers. 100% client-side — no uploads.",
        "tags": [
          "Format & Parse"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "beautify",
                      "minify",
                      "validate"
                    ],
                    "description": "Beautify with indentation, minify to a single line, or validate only."
                  },
                  "input": {
                    "type": "string",
                    "description": "The XML document to format, minify, or validate."
                  },
                  "indent": {
                    "type": "string",
                    "enum": [
                      "2",
                      "4",
                      "tab"
                    ],
                    "description": "Indentation used when beautifying: 2 spaces, 4 spaces, or tabs."
                  }
                },
                "required": [
                  "mode",
                  "input",
                  "indent"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "output": {
                          "type": "string",
                          "description": "The formatted XML, or the original input in validate mode. Empty when invalid."
                        },
                        "valid": {
                          "type": "boolean",
                          "description": "Whether the input is well-formed XML."
                        },
                        "error": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Error message when the document is not well-formed."
                        },
                        "errorLine": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "1-based line of the error when invalid."
                        },
                        "errorColumn": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "1-based column of the error when invalid."
                        }
                      },
                      "required": [
                        "output",
                        "valid",
                        "error",
                        "errorLine",
                        "errorColumn"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/yaml-json": {
      "post": {
        "operationId": "yaml-json",
        "summary": "YAML ↔ JSON Converter",
        "description": "Convert YAML to JSON and JSON to YAML online. Bidirectional, validated conversion with error locations. Free, fast, 100% client-side.",
        "tags": [
          "Format & Parse"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "yaml-to-json",
                      "json-to-yaml"
                    ],
                    "description": "Conversion direction: YAML to JSON, or JSON to YAML."
                  },
                  "input": {
                    "type": "string",
                    "description": "The YAML or JSON text to convert."
                  },
                  "indent": {
                    "type": "string",
                    "enum": [
                      "2",
                      "4"
                    ],
                    "description": "Number of spaces per indentation level in the output."
                  }
                },
                "required": [
                  "mode",
                  "input",
                  "indent"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "output": {
                          "type": "string",
                          "description": "The converted document. Empty when the input is invalid."
                        },
                        "valid": {
                          "type": "boolean",
                          "description": "Whether the input parsed successfully."
                        },
                        "error": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Parse error message when invalid."
                        },
                        "errorLine": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "1-based line of the parse error when invalid."
                        },
                        "errorColumn": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "1-based column of the parse error when invalid."
                        }
                      },
                      "required": [
                        "output",
                        "valid",
                        "error",
                        "errorLine",
                        "errorColumn"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/regex-tester": {
      "post": {
        "operationId": "regex-tester",
        "summary": "RegEx Tester",
        "description": "Test and debug regular expressions live. Match highlighting, capture group inspection, flag toggles, and pattern explanations — 100% client-side.",
        "tags": [
          "Format & Parse"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "pattern": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "The JavaScript regular expression pattern (without slashes). Capped at 500 characters as a ReDoS guard."
                  },
                  "text": {
                    "type": "string",
                    "maxLength": 100000,
                    "description": "The test text to match against. Capped at 100,000 characters as a ReDoS guard."
                  },
                  "flags": {
                    "type": "object",
                    "properties": {
                      "global": {
                        "type": "boolean",
                        "description": "g — find all matches instead of stopping at the first."
                      },
                      "ignoreCase": {
                        "type": "boolean",
                        "description": "i — case-insensitive matching."
                      },
                      "multiline": {
                        "type": "boolean",
                        "description": "m — ^ and $ match line boundaries."
                      },
                      "dotall": {
                        "type": "boolean",
                        "description": "s — dot matches newlines."
                      },
                      "unicode": {
                        "type": "boolean",
                        "description": "u — full Unicode matching."
                      },
                      "sticky": {
                        "type": "boolean",
                        "description": "y — match only from lastIndex onwards."
                      }
                    },
                    "required": [
                      "global",
                      "ignoreCase",
                      "multiline",
                      "dotall",
                      "unicode",
                      "sticky"
                    ],
                    "additionalProperties": false,
                    "description": "Regular expression flags."
                  }
                },
                "required": [
                  "pattern",
                  "text",
                  "flags"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "valid": {
                          "type": "boolean",
                          "description": "Whether the pattern compiled successfully."
                        },
                        "error": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Parse error message when the pattern is invalid."
                        },
                        "matchCount": {
                          "type": "number",
                          "description": "Total number of matches found."
                        },
                        "truncated": {
                          "type": "boolean",
                          "description": "Whether the matches list was capped at 1000 entries."
                        },
                        "matches": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "index": {
                                "type": "number",
                                "description": "1-based match number."
                              },
                              "text": {
                                "type": "string",
                                "description": "The matched text."
                              },
                              "range": {
                                "type": "array",
                                "prefixItems": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "number"
                                  }
                                ],
                                "description": "Start and end offsets in the input text."
                              },
                              "groups": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "index": {
                                      "type": "number",
                                      "description": "1-based capture group number."
                                    },
                                    "name": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "description": "Group name for named capture groups."
                                    },
                                    "value": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "description": "Captured value, or null when the group did not participate."
                                    }
                                  },
                                  "required": [
                                    "index",
                                    "name",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                },
                                "description": "Capture group values for this match."
                              }
                            },
                            "required": [
                              "index",
                              "text",
                              "range",
                              "groups"
                            ],
                            "additionalProperties": false
                          },
                          "description": "All matches (capped at 1000)."
                        },
                        "explanation": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "token": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "token",
                              "description"
                            ],
                            "additionalProperties": false
                          },
                          "description": "Token-by-token explanation of the pattern."
                        }
                      },
                      "required": [
                        "valid",
                        "error",
                        "matchCount",
                        "truncated",
                        "matches",
                        "explanation"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/jwt-decoder": {
      "post": {
        "operationId": "jwt-decoder",
        "summary": "JWT Decoder",
        "description": "Decode and inspect JSON Web Tokens online. View header, payload, claims and expiry — with optional HMAC (HS256/384/512) signature verification. 100% client-side.",
        "tags": [
          "Encode & Cipher"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 65536,
                    "description": "The JSON Web Token to decode (header.payload.signature)."
                  }
                },
                "required": [
                  "token"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "header": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {},
                          "description": "Decoded JWT header claims."
                        },
                        "payload": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {},
                          "description": "Decoded JWT payload claims."
                        },
                        "signature": {
                          "type": "string",
                          "description": "Raw base64url signature segment."
                        },
                        "algorithm": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Signing algorithm from the header (alg claim), if present."
                        },
                        "validity": {
                          "type": "string",
                          "enum": [
                            "valid",
                            "expired",
                            "not-yet-valid",
                            "no-expiry"
                          ],
                          "description": "Time-based validity based on exp/nbf."
                        },
                        "issuedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "ISO-8601 rendering of the iat claim, if numeric."
                        },
                        "expiresAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "ISO-8601 rendering of the exp claim, if numeric."
                        },
                        "notBefore": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "ISO-8601 rendering of the nbf claim, if numeric."
                        }
                      },
                      "required": [
                        "header",
                        "payload",
                        "signature",
                        "algorithm",
                        "validity",
                        "issuedAt",
                        "expiresAt",
                        "notBefore"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/certificate-decoder": {
      "post": {
        "operationId": "certificate-decoder",
        "summary": "Certificate Decoder",
        "description": "Decode X.509 certificates and CSRs online: PEM, DER, multi-cert bundles, SANs, extensions, fingerprints, chain signature checks — free, runs locally.",
        "tags": [
          "Encode & Cipher"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "pem": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 524288,
                    "description": "PEM text with one or more blocks (CERTIFICATE and CERTIFICATE REQUEST are parsed; PRIVATE KEY blocks are skipped with a warning; PKCS#7/CMS is rejected per block), or a single bare-base64 DER object. Mixed bundles and trailing garbage are tolerated with warnings. Maximum 16 blocks, 64KB decoded DER per block."
                  },
                  "nowMs": {
                    "description": "Optional Unix epoch milliseconds used as 'now' for validity status and deltas. Omit for a clock-free response: no status fields are emitted at all.",
                    "type": "number"
                  }
                },
                "required": [
                  "pem"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "schemaVersion": {
                          "type": "number",
                          "const": 1
                        },
                        "blocks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "index": {
                                "type": "number",
                                "description": "Zero-based position in the input, order preserved."
                              },
                              "label": {
                                "type": "string",
                                "description": "PEM label as found, or \"DER\" for bare-base64 input."
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "certificate",
                                  "csr",
                                  "private_key",
                                  "error"
                                ]
                              },
                              "warning": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "error": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "code": {
                                        "type": "string"
                                      },
                                      "message": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "message"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "Per-block failure — one bad block never fails the whole request."
                              },
                              "duplicateOf": {
                                "anyOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "Block index of the first identical certificate (same DER), when this block is a duplicate."
                              },
                              "certificate": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "version": {
                                        "type": "number",
                                        "description": "X.509 version: 1, 2 or 3."
                                      },
                                      "subject": {
                                        "type": "object",
                                        "properties": {
                                          "rdns": {
                                            "type": "array",
                                            "items": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "description": "Friendly short name for known attribute OIDs (CN, O, OU, C, DC, emailAddress, ...), the dotted OID otherwise."
                                                  },
                                                  "oid": {
                                                    "type": "string"
                                                  },
                                                  "value": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "oid",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "description": "Relative distinguished names in as-encoded order; each RDN is a list of attributes because multi-value RDNs exist. Display order (RFC 4514) is the reverse — use the rfc4514 field."
                                          },
                                          "rfc4514": {
                                            "type": "string",
                                            "description": "RFC 4514 string rendering of the DN (reverse of as-encoded order, CN-first for typical DNs)."
                                          }
                                        },
                                        "required": [
                                          "rdns",
                                          "rfc4514"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "issuer": {
                                        "type": "object",
                                        "properties": {
                                          "rdns": {
                                            "type": "array",
                                            "items": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "description": "Friendly short name for known attribute OIDs (CN, O, OU, C, DC, emailAddress, ...), the dotted OID otherwise."
                                                  },
                                                  "oid": {
                                                    "type": "string"
                                                  },
                                                  "value": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "oid",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "description": "Relative distinguished names in as-encoded order; each RDN is a list of attributes because multi-value RDNs exist. Display order (RFC 4514) is the reverse — use the rfc4514 field."
                                          },
                                          "rfc4514": {
                                            "type": "string",
                                            "description": "RFC 4514 string rendering of the DN (reverse of as-encoded order, CN-first for typical DNs)."
                                          }
                                        },
                                        "required": [
                                          "rdns",
                                          "rfc4514"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "serial": {
                                        "type": "object",
                                        "properties": {
                                          "hex": {
                                            "type": "string",
                                            "description": "Serial content octets, lowercase hex, at most one leading 00 sign-pad stripped."
                                          },
                                          "decimal": {
                                            "type": "string",
                                            "description": "Signed decimal — DER INTEGERs are signed and negative serials exist in the wild."
                                          },
                                          "negative": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "hex",
                                          "decimal",
                                          "negative"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "validity": {
                                        "type": "object",
                                        "properties": {
                                          "notBefore": {
                                            "type": "string",
                                            "description": "ISO 8601 UTC timestamp."
                                          },
                                          "notAfter": {
                                            "type": "string",
                                            "description": "ISO 8601 UTC timestamp."
                                          },
                                          "noWellDefinedExpiry": {
                                            "type": "boolean",
                                            "description": "True when notAfter is exactly 99991231235959Z (RFC 5280 'no well-defined expiry')."
                                          },
                                          "status": {
                                            "description": "Only present when nowMs was supplied. Inclusive bounds: expired only when nowMs > notAfter.",
                                            "type": "string",
                                            "enum": [
                                              "valid",
                                              "not_yet_valid",
                                              "expired"
                                            ]
                                          },
                                          "startsInMs": {
                                            "description": "Only with nowMs: milliseconds until notBefore (0 when already valid).",
                                            "type": "number"
                                          },
                                          "expiresInMs": {
                                            "description": "Only with nowMs: milliseconds until notAfter (negative when expired).",
                                            "type": "number"
                                          }
                                        },
                                        "required": [
                                          "notBefore",
                                          "notAfter",
                                          "noWellDefinedExpiry"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "signature": {
                                        "type": "object",
                                        "properties": {
                                          "oid": {
                                            "type": "string"
                                          },
                                          "label": {
                                            "type": "string",
                                            "description": "Human label, e.g. \"SHA-256 with RSA\", \"ECDSA with SHA-256\", \"RSA-PSS with SHA-256 (MGF1-SHA-256, salt length 32)\", \"Ed25519\"."
                                          },
                                          "hash": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "mgfHash": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "description": "RSA-PSS only: MGF1 hash, null otherwise."
                                          },
                                          "saltLength": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "description": "RSA-PSS only."
                                          },
                                          "innerMismatch": {
                                            "type": "boolean",
                                            "description": "True when the TBS signature algorithm OID disagrees with the outer signature algorithm OID."
                                          },
                                          "innerOid": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "oid",
                                          "label",
                                          "hash",
                                          "mgfHash",
                                          "saltLength",
                                          "innerMismatch",
                                          "innerOid"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "publicKey": {
                                        "type": "object",
                                        "properties": {
                                          "algorithm": {
                                            "type": "string",
                                            "description": "RSA, EC, Ed25519, Ed448 or \"OID <dotted>\" for unrecognized key types."
                                          },
                                          "bits": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "description": "RSA modulus bits or EC curve bits."
                                          },
                                          "exponent": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "description": "RSA public exponent as a decimal string."
                                          },
                                          "curve": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "description": "EC curve name (P-256, P-384, P-521, secp256k1), dotted OID for unknown curves, or \"explicit parameters\"."
                                          },
                                          "spkiSha256Hex": {
                                            "type": "string",
                                            "description": "SHA-256 over the DER SubjectPublicKeyInfo, hex."
                                          },
                                          "spkiSha256Base64": {
                                            "type": "string",
                                            "description": "SHA-256 over the DER SubjectPublicKeyInfo, base64 — the public-key pin format."
                                          }
                                        },
                                        "required": [
                                          "algorithm",
                                          "bits",
                                          "exponent",
                                          "curve",
                                          "spkiSha256Hex",
                                          "spkiSha256Base64"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "fingerprints": {
                                        "type": "object",
                                        "properties": {
                                          "sha256Hex": {
                                            "type": "string",
                                            "description": "SHA-256 over the original DER bytes."
                                          },
                                          "sha1Hex": {
                                            "type": "string",
                                            "description": "SHA-1 over the original DER bytes."
                                          }
                                        },
                                        "required": [
                                          "sha256Hex",
                                          "sha1Hex"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "extensions": {
                                        "anyOf": [
                                          {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "oid": {
                                                  "type": "string"
                                                },
                                                "name": {
                                                  "type": "string"
                                                },
                                                "critical": {
                                                  "type": "boolean"
                                                },
                                                "san": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "type": {
                                                            "type": "string"
                                                          },
                                                          "value": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "type",
                                                          "value"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ],
                                                  "description": "SAN entries (dns, email, uri, ipv4, ipv6 as formatted strings; otherName/directoryName/etc rendered best-effort). Empty array = present but empty; null = not a SAN extension."
                                                },
                                                "keyUsage": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "eku": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "oid": {
                                                            "type": "string"
                                                          },
                                                          "name": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "required": [
                                                          "oid",
                                                          "name"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "basicConstraints": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "ca": {
                                                          "type": "boolean"
                                                        },
                                                        "pathLen": {
                                                          "anyOf": [
                                                            {
                                                              "type": "number"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "ca",
                                                        "pathLen"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ],
                                                  "description": "pathLen 0 and pathLen absent are preserved as 0 vs null."
                                                },
                                                "skid": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ],
                                                  "description": "Subject Key Identifier, hex."
                                                },
                                                "akid": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "keyId": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "issuer": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        },
                                                        "serial": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "keyId",
                                                        "issuer",
                                                        "serial"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ],
                                                  "description": "Authority Key Identifier — may carry issuer + serial instead of a key id."
                                                },
                                                "crlDistributionPoints": {
                                                  "anyOf": [
                                                    {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "uri": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          },
                                                          "raw": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ]
                                                          }
                                                        },
                                                        "required": [
                                                          "uri",
                                                          "raw"
                                                        ],
                                                        "additionalProperties": false
                                                      }
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "aia": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "ocsp": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string"
                                                          }
                                                        },
                                                        "caIssuers": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string"
                                                          }
                                                        }
                                                      },
                                                      "required": [
                                                        "ocsp",
                                                        "caIssuers"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ]
                                                },
                                                "rawHex": {
                                                  "anyOf": [
                                                    {
                                                      "type": "string"
                                                    },
                                                    {
                                                      "type": "null"
                                                    }
                                                  ],
                                                  "description": "Raw extnValue hex for unknown/unparseable extensions, capped at 8192 hex chars."
                                                },
                                                "rawHexTruncated": {
                                                  "type": "boolean"
                                                },
                                                "duplicate": {
                                                  "type": "boolean",
                                                  "description": "True when this extension OID appears more than once in the certificate."
                                                }
                                              },
                                              "required": [
                                                "oid",
                                                "name",
                                                "critical",
                                                "san",
                                                "keyUsage",
                                                "eku",
                                                "basicConstraints",
                                                "skid",
                                                "akid",
                                                "crlDistributionPoints",
                                                "aia",
                                                "rawHex",
                                                "rawHexTruncated",
                                                "duplicate"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "description": "Extensions in as-encoded order. Null for pre-v3 certificates, which have no extensions field at all (NOT the same as an empty list)."
                                      },
                                      "selfIssued": {
                                        "type": "boolean",
                                        "description": "subject and issuer names are DER-identical. selfIssued does not imply self-signed — see chain links for verification."
                                      }
                                    },
                                    "required": [
                                      "version",
                                      "subject",
                                      "issuer",
                                      "serial",
                                      "validity",
                                      "signature",
                                      "publicKey",
                                      "fingerprints",
                                      "extensions",
                                      "selfIssued"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "csr": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "subject": {
                                        "type": "object",
                                        "properties": {
                                          "rdns": {
                                            "type": "array",
                                            "items": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "type": {
                                                    "type": "string",
                                                    "description": "Friendly short name for known attribute OIDs (CN, O, OU, C, DC, emailAddress, ...), the dotted OID otherwise."
                                                  },
                                                  "oid": {
                                                    "type": "string"
                                                  },
                                                  "value": {
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type",
                                                  "oid",
                                                  "value"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "description": "Relative distinguished names in as-encoded order; each RDN is a list of attributes because multi-value RDNs exist. Display order (RFC 4514) is the reverse — use the rfc4514 field."
                                          },
                                          "rfc4514": {
                                            "type": "string",
                                            "description": "RFC 4514 string rendering of the DN (reverse of as-encoded order, CN-first for typical DNs)."
                                          }
                                        },
                                        "required": [
                                          "rdns",
                                          "rfc4514"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "publicKey": {
                                        "type": "object",
                                        "properties": {
                                          "algorithm": {
                                            "type": "string",
                                            "description": "RSA, EC, Ed25519, Ed448 or \"OID <dotted>\" for unrecognized key types."
                                          },
                                          "bits": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "description": "RSA modulus bits or EC curve bits."
                                          },
                                          "exponent": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "description": "RSA public exponent as a decimal string."
                                          },
                                          "curve": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "description": "EC curve name (P-256, P-384, P-521, secp256k1), dotted OID for unknown curves, or \"explicit parameters\"."
                                          },
                                          "spkiSha256Hex": {
                                            "type": "string",
                                            "description": "SHA-256 over the DER SubjectPublicKeyInfo, hex."
                                          },
                                          "spkiSha256Base64": {
                                            "type": "string",
                                            "description": "SHA-256 over the DER SubjectPublicKeyInfo, base64 — the public-key pin format."
                                          }
                                        },
                                        "required": [
                                          "algorithm",
                                          "bits",
                                          "exponent",
                                          "curve",
                                          "spkiSha256Hex",
                                          "spkiSha256Base64"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "signature": {
                                        "type": "object",
                                        "properties": {
                                          "oid": {
                                            "type": "string"
                                          },
                                          "label": {
                                            "type": "string",
                                            "description": "Human label, e.g. \"SHA-256 with RSA\", \"ECDSA with SHA-256\", \"RSA-PSS with SHA-256 (MGF1-SHA-256, salt length 32)\", \"Ed25519\"."
                                          },
                                          "hash": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "mgfHash": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "description": "RSA-PSS only: MGF1 hash, null otherwise."
                                          },
                                          "saltLength": {
                                            "anyOf": [
                                              {
                                                "type": "number"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "description": "RSA-PSS only."
                                          },
                                          "innerMismatch": {
                                            "type": "boolean",
                                            "description": "True when the TBS signature algorithm OID disagrees with the outer signature algorithm OID."
                                          },
                                          "innerOid": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "oid",
                                          "label",
                                          "hash",
                                          "mgfHash",
                                          "saltLength",
                                          "innerMismatch",
                                          "innerOid"
                                        ],
                                        "additionalProperties": false
                                      },
                                      "requestedExtensions": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "oid": {
                                              "type": "string"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "critical": {
                                              "type": "boolean"
                                            },
                                            "san": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "type": {
                                                        "type": "string"
                                                      },
                                                      "value": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "type",
                                                      "value"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "description": "SAN entries (dns, email, uri, ipv4, ipv6 as formatted strings; otherName/directoryName/etc rendered best-effort). Empty array = present but empty; null = not a SAN extension."
                                            },
                                            "keyUsage": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "string"
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "eku": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "oid": {
                                                        "type": "string"
                                                      },
                                                      "name": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "oid",
                                                      "name"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "basicConstraints": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "ca": {
                                                      "type": "boolean"
                                                    },
                                                    "pathLen": {
                                                      "anyOf": [
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "ca",
                                                    "pathLen"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "description": "pathLen 0 and pathLen absent are preserved as 0 vs null."
                                            },
                                            "skid": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "description": "Subject Key Identifier, hex."
                                            },
                                            "akid": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "keyId": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "issuer": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    },
                                                    "serial": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  "required": [
                                                    "keyId",
                                                    "issuer",
                                                    "serial"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "description": "Authority Key Identifier — may carry issuer + serial instead of a key id."
                                            },
                                            "crlDistributionPoints": {
                                              "anyOf": [
                                                {
                                                  "type": "array",
                                                  "items": {
                                                    "type": "object",
                                                    "properties": {
                                                      "uri": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      },
                                                      "raw": {
                                                        "anyOf": [
                                                          {
                                                            "type": "string"
                                                          },
                                                          {
                                                            "type": "null"
                                                          }
                                                        ]
                                                      }
                                                    },
                                                    "required": [
                                                      "uri",
                                                      "raw"
                                                    ],
                                                    "additionalProperties": false
                                                  }
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "aia": {
                                              "anyOf": [
                                                {
                                                  "type": "object",
                                                  "properties": {
                                                    "ocsp": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    },
                                                    "caIssuers": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "ocsp",
                                                    "caIssuers"
                                                  ],
                                                  "additionalProperties": false
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "rawHex": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "description": "Raw extnValue hex for unknown/unparseable extensions, capped at 8192 hex chars."
                                            },
                                            "rawHexTruncated": {
                                              "type": "boolean"
                                            },
                                            "duplicate": {
                                              "type": "boolean",
                                              "description": "True when this extension OID appears more than once in the certificate."
                                            }
                                          },
                                          "required": [
                                            "oid",
                                            "name",
                                            "critical",
                                            "san",
                                            "keyUsage",
                                            "eku",
                                            "basicConstraints",
                                            "skid",
                                            "akid",
                                            "crlDistributionPoints",
                                            "aia",
                                            "rawHex",
                                            "rawHexTruncated",
                                            "duplicate"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "description": "Extensions from the extensionRequest attribute (SANs etc). Empty for CSRs without one."
                                      },
                                      "attributes": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "oid": {
                                              "type": "string"
                                            },
                                            "values": {
                                              "type": "array",
                                              "items": {
                                                "type": "string"
                                              }
                                            }
                                          },
                                          "required": [
                                            "oid",
                                            "values"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "description": "Non-extensionRequest attributes (e.g. challengePassword), values rendered best-effort."
                                      },
                                      "selfSignature": {
                                        "type": "object",
                                        "properties": {
                                          "status": {
                                            "type": "string",
                                            "enum": [
                                              "verified",
                                              "invalid_signature",
                                              "unsupported_algorithm",
                                              "issuer_not_found",
                                              "ambiguous_issuer",
                                              "verification_error"
                                            ],
                                            "description": "Per-link signature verification result. 'verified' means only that the signature cryptographically matches — trust is NOT evaluated (no root store, revocation not checked)."
                                          },
                                          "reason": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "status",
                                          "reason"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "required": [
                                      "subject",
                                      "publicKey",
                                      "signature",
                                      "requestedExtensions",
                                      "attributes",
                                      "selfSignature"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "index",
                              "label",
                              "kind",
                              "warning",
                              "error",
                              "duplicateOf",
                              "certificate",
                              "csr"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "warnings": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "chain": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "ordered": {
                                  "type": "array",
                                  "items": {
                                    "type": "number"
                                  },
                                  "description": "Unique certificate block indices, leaf-first, deduplicated by DER."
                                },
                                "ambiguous": {
                                  "type": "boolean",
                                  "description": "True when any link had multiple candidate issuers (cross-signed)."
                                },
                                "links": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "subjectIndex": {
                                        "type": "number"
                                      },
                                      "issuerIndex": {
                                        "anyOf": [
                                          {
                                            "type": "number"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "verification": {
                                        "type": "string",
                                        "enum": [
                                          "verified",
                                          "invalid_signature",
                                          "unsupported_algorithm",
                                          "issuer_not_found",
                                          "ambiguous_issuer",
                                          "verification_error"
                                        ],
                                        "description": "Per-link signature verification result. 'verified' means only that the signature cryptographically matches — trust is NOT evaluated (no root store, revocation not checked)."
                                      },
                                      "reason": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "selfIssued": {
                                        "type": "boolean"
                                      },
                                      "selfSigned": {
                                        "type": "boolean",
                                        "description": "selfIssued AND the signature verifies with the certificate's own key."
                                      }
                                    },
                                    "required": [
                                      "subjectIndex",
                                      "issuerIndex",
                                      "verification",
                                      "reason",
                                      "selfIssued",
                                      "selfSigned"
                                    ],
                                    "additionalProperties": false
                                  }
                                }
                              },
                              "required": [
                                "ordered",
                                "ambiguous",
                                "links"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Issuer graph over the unique certificates; null when fewer than two unique certificates were parsed."
                        },
                        "summary": {
                          "type": "object",
                          "properties": {
                            "certificates": {
                              "type": "number"
                            },
                            "csrs": {
                              "type": "number"
                            },
                            "errors": {
                              "type": "number"
                            },
                            "privateKeys": {
                              "type": "number"
                            },
                            "duplicatesSkipped": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "certificates",
                            "csrs",
                            "errors",
                            "privateKeys",
                            "duplicatesSkipped"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "schemaVersion",
                        "blocks",
                        "warnings",
                        "chain",
                        "summary"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/url-encode": {
      "post": {
        "operationId": "url-encode",
        "summary": "URL Encode/Decode",
        "description": "Percent-encode and decode URLs and query strings online. Component and full-URL modes, full unicode support, 100% client-side and free.",
        "tags": [
          "Encode & Cipher"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "encode",
                      "decode"
                    ],
                    "description": "Whether to percent-encode or percent-decode the input."
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "component",
                      "full"
                    ],
                    "description": "component encodes/decodes every reserved character (like encodeURIComponent); full preserves URL structure characters like / : ? & = # (like encodeURI)."
                  },
                  "input": {
                    "type": "string",
                    "maxLength": 512000,
                    "description": "The text to encode, or the percent-encoded string to decode."
                  }
                },
                "required": [
                  "mode",
                  "scope",
                  "input"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "output": {
                          "type": "string",
                          "description": "The percent-encoded or decoded result."
                        }
                      },
                      "required": [
                        "output"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/url-parser": {
      "post": {
        "operationId": "url-parser",
        "summary": "URL Parser",
        "description": "Parse any URL into protocol, auth, host, port, path, query params and fragment. Edit query parameters in a decoded table. Free and client-side.",
        "tags": [
          "Web & Network"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8192,
                    "description": "The absolute URL to parse, including protocol."
                  },
                  "params": {
                    "description": "Optional replacement query parameters — when given, the URL is rebuilt with these and the result reflects the new URL.",
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "description": "Query parameter name (decoded)."
                        },
                        "value": {
                          "type": "string",
                          "description": "Query parameter value (decoded)."
                        }
                      },
                      "required": [
                        "key",
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "url"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "href": {
                          "type": "string",
                          "description": "The full normalized URL."
                        },
                        "origin": {
                          "type": "string",
                          "description": "Protocol + host + port."
                        },
                        "protocol": {
                          "type": "string",
                          "description": "URL scheme without the trailing colon."
                        },
                        "username": {
                          "type": "string",
                          "description": "Username from the authority, decoded."
                        },
                        "password": {
                          "type": "string",
                          "description": "Password from the authority, decoded."
                        },
                        "hostname": {
                          "type": "string",
                          "description": "Host without port."
                        },
                        "port": {
                          "type": "string",
                          "description": "Explicit port, or empty when using the default."
                        },
                        "pathname": {
                          "type": "string",
                          "description": "Path component."
                        },
                        "search": {
                          "type": "string",
                          "description": "Raw query string including the leading ?."
                        },
                        "hash": {
                          "type": "string",
                          "description": "Fragment without the leading #, decoded."
                        },
                        "params": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "Query parameter name (decoded)."
                              },
                              "value": {
                                "type": "string",
                                "description": "Query parameter value (decoded)."
                              }
                            },
                            "required": [
                              "key",
                              "value"
                            ],
                            "additionalProperties": false
                          },
                          "description": "Decoded query parameters in order, duplicates preserved."
                        }
                      },
                      "required": [
                        "href",
                        "origin",
                        "protocol",
                        "username",
                        "password",
                        "hostname",
                        "port",
                        "pathname",
                        "search",
                        "hash",
                        "params"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/pwd-gen": {
      "post": {
        "operationId": "pwd-gen",
        "summary": "Strong Password Generator",
        "description": "Generate cryptographically secure passwords up to 128 characters. Custom character sets, ambiguous-character filter, strength meter. 100% client-side.",
        "tags": [
          "Generators"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "length": {
                    "type": "integer",
                    "minimum": 8,
                    "maximum": 128,
                    "description": "Password length (8–128 characters)."
                  },
                  "lowercase": {
                    "default": true,
                    "description": "Include lowercase letters (a–z).",
                    "type": "boolean"
                  },
                  "uppercase": {
                    "default": true,
                    "description": "Include uppercase letters (A–Z).",
                    "type": "boolean"
                  },
                  "digits": {
                    "default": true,
                    "description": "Include digits (0–9).",
                    "type": "boolean"
                  },
                  "symbols": {
                    "default": true,
                    "description": "Include symbols (!@#$%^&*…).",
                    "type": "boolean"
                  },
                  "excludeAmbiguous": {
                    "default": false,
                    "description": "Exclude ambiguous characters (I, l, 1, O, 0).",
                    "type": "boolean"
                  },
                  "count": {
                    "default": 5,
                    "description": "How many passwords to generate (1–20).",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  }
                },
                "required": [
                  "length",
                  "lowercase",
                  "uppercase",
                  "digits",
                  "symbols",
                  "excludeAmbiguous",
                  "count"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "passwords": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The generated passwords."
                        },
                        "entropyBits": {
                          "type": "number",
                          "description": "Entropy in bits of each generated password given the chosen settings."
                        }
                      },
                      "required": [
                        "passwords",
                        "entropyBits"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/uuid-gen": {
      "post": {
        "operationId": "uuid-gen",
        "summary": "UUID / ULID Generator",
        "description": "Generate UUID v4, UUID v7 and ULIDs online. Bulk generation up to 1000 IDs, uppercase and hyphen options, instant copy. Free and client-side.",
        "tags": [
          "Generators"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "format": {
                    "type": "string",
                    "enum": [
                      "uuid-v4",
                      "uuid-v7",
                      "ulid"
                    ],
                    "description": "The identifier format to generate."
                  },
                  "count": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000,
                    "description": "How many IDs to generate (1–1000)."
                  },
                  "uppercase": {
                    "default": false,
                    "description": "Uppercase the generated IDs.",
                    "type": "boolean"
                  },
                  "hyphens": {
                    "default": true,
                    "description": "Include hyphens in UUIDs (ignored for ULID).",
                    "type": "boolean"
                  }
                },
                "required": [
                  "format",
                  "count",
                  "uppercase",
                  "hyphens"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "ids": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The generated identifiers."
                        }
                      },
                      "required": [
                        "ids"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/mock-data": {
      "post": {
        "operationId": "mock-data",
        "summary": "Mock Data Generator",
        "description": "Generate realistic mock data for testing: fake people, emails, addresses, companies, products, UUIDs and more. Export as JSON, CSV or SQL. 100% client-side.",
        "tags": [
          "Generators"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "rows": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000,
                    "description": "Number of records to generate."
                  },
                  "fields": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "firstName",
                        "lastName",
                        "fullName",
                        "username",
                        "email",
                        "phone",
                        "jobTitle",
                        "street",
                        "city",
                        "zipCode",
                        "country",
                        "company",
                        "product",
                        "price",
                        "uuid",
                        "integer",
                        "float",
                        "boolean",
                        "date",
                        "timestamp"
                      ]
                    },
                    "description": "Fields to include in each record, in column order."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "json",
                      "csv",
                      "sql"
                    ],
                    "description": "Export format."
                  },
                  "tableName": {
                    "default": "mock_data",
                    "description": "Target table name for SQL INSERT statements.",
                    "type": "string",
                    "maxLength": 64,
                    "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$"
                  }
                },
                "required": [
                  "rows",
                  "fields",
                  "format",
                  "tableName"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "string",
                          "description": "The generated dataset in the requested format."
                        },
                        "rows": {
                          "type": "number",
                          "description": "Number of records generated."
                        },
                        "format": {
                          "type": "string",
                          "enum": [
                            "json",
                            "csv",
                            "sql"
                          ],
                          "description": "The export format used."
                        }
                      },
                      "required": [
                        "data",
                        "rows",
                        "format"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/sql-beautify": {
      "post": {
        "operationId": "sql-beautify",
        "summary": "SQL Beautifier",
        "description": "Format and beautify SQL queries online. Supports PostgreSQL, MySQL, SQLite, SQL Server and Oracle. Keyword casing and custom indentation. 100% client-side.",
        "tags": [
          "Format & Parse"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "sql": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200000,
                    "description": "The SQL query or script to format."
                  },
                  "dialect": {
                    "type": "string",
                    "enum": [
                      "sql",
                      "postgresql",
                      "mysql",
                      "mariadb",
                      "sqlite",
                      "transactsql",
                      "plsql"
                    ],
                    "description": "The SQL dialect to parse and format for."
                  },
                  "keywordCase": {
                    "type": "string",
                    "enum": [
                      "preserve",
                      "upper",
                      "lower"
                    ],
                    "description": "Letter case applied to SQL keywords."
                  },
                  "indentSize": {
                    "type": "integer",
                    "minimum": 2,
                    "maximum": 8,
                    "description": "Number of spaces per indentation level."
                  }
                },
                "required": [
                  "sql",
                  "dialect",
                  "keywordCase",
                  "indentSize"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "sql": {
                          "type": "string",
                          "description": "The formatted SQL."
                        }
                      },
                      "required": [
                        "sql"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/unix-timestamp": {
      "post": {
        "operationId": "unix-timestamp",
        "summary": "Unix Timestamp Converter",
        "description": "Convert unix timestamps to dates and dates to epoch seconds or milliseconds online. Live clock, timezone-aware output, free and fast.",
        "tags": [
          "Format & Parse"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "unix-to-date",
                      "date-to-unix"
                    ],
                    "description": "Conversion direction: unix timestamp to date, or date to unix timestamp."
                  },
                  "input": {
                    "type": "string",
                    "maxLength": 1000000,
                    "description": "For unix-to-date: a unix timestamp (integer or fractional seconds). For date-to-unix: an ISO 8601 date string. Strings without a timezone offset are interpreted as UTC."
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "auto",
                      "s",
                      "ms"
                    ],
                    "description": "Unit of the input timestamp for unix-to-date. \"auto\" treats absolute values >= 1e12 as milliseconds, otherwise seconds. Ignored for date-to-unix."
                  }
                },
                "required": [
                  "mode",
                  "input",
                  "unit"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "unix": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Unix timestamp in whole seconds (fractional input is floored)."
                        },
                        "ms": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Unix timestamp in milliseconds."
                        },
                        "iso": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "ISO 8601 representation of the date in UTC."
                        },
                        "utc": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Human-readable UTC string of the date."
                        },
                        "error": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Error message when the input could not be converted."
                        }
                      },
                      "required": [
                        "unix",
                        "ms",
                        "iso",
                        "utc",
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/qr-generator": {
      "post": {
        "operationId": "qr-generator",
        "summary": "QR Code Generator",
        "description": "Create QR codes for links, WiFi networks, text and email online. Custom colors, error correction and margins. Download as SVG or PNG — free, no sign-up.",
        "tags": [
          "Generators"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "payload": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000,
                    "description": "The content to encode: URL, text, WIFI: payload, mailto: link, etc."
                  },
                  "ecLevel": {
                    "default": "M",
                    "description": "Error correction level: L (7%), M (15%), Q (25%) or H (30%) damage tolerance. Higher levels hold less data.",
                    "type": "string",
                    "enum": [
                      "L",
                      "M",
                      "Q",
                      "H"
                    ]
                  },
                  "margin": {
                    "default": 4,
                    "description": "Quiet zone width in modules (0–16). The QR spec recommends at least 4.",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 16
                  },
                  "foreground": {
                    "default": "#000000",
                    "description": "Hex color of the dark modules.",
                    "type": "string",
                    "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
                  },
                  "background": {
                    "default": "#ffffff",
                    "description": "Hex color of the light modules and quiet zone.",
                    "type": "string",
                    "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
                  }
                },
                "required": [
                  "payload",
                  "ecLevel",
                  "margin",
                  "foreground",
                  "background"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "svg": {
                          "type": "string",
                          "description": "The QR code as an SVG document. Byte-identical for identical input."
                        },
                        "moduleCount": {
                          "type": "number",
                          "description": "Width/height of the QR symbol in modules, excluding the quiet zone."
                        },
                        "version": {
                          "type": "number",
                          "description": "QR symbol version (1–40); version 1 is 21×21 modules, each step adds 4."
                        }
                      },
                      "required": [
                        "svg",
                        "moduleCount",
                        "version"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/chmod-calc": {
      "post": {
        "operationId": "chmod-calc",
        "summary": "Chmod Calculator",
        "description": "Convert chmod permissions between octal (755) and symbolic (rwxr-xr-x) online. Handles setuid, setgid and sticky bits — free and instant.",
        "tags": [
          "Format & Parse"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "octal": {
                    "description": "Octal permission value: 3 or 4 digits (0-7), optional leading zero. Examples: 755, 0644, 4755.",
                    "type": "string",
                    "maxLength": 20
                  },
                  "symbolic": {
                    "description": "Symbolic permission string: 9 characters (rwxrwxrwx with s/S/t/T substitutions), or a 10-character ls -l string with a leading file-type character.",
                    "type": "string",
                    "maxLength": 20
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "octal": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Octal representation, 3 digits or 4 when special bits are set."
                        },
                        "symbolic": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "9-character symbolic representation with s/S/t/T for special bits."
                        },
                        "bits": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "setuid": {
                                  "type": "boolean"
                                },
                                "setgid": {
                                  "type": "boolean"
                                },
                                "sticky": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "setuid",
                                "setgid",
                                "sticky"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Special permission bits."
                        },
                        "error": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Error message when the input could not be converted."
                        }
                      },
                      "required": [
                        "octal",
                        "symbolic",
                        "bits",
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/cidr-calculator": {
      "post": {
        "operationId": "cidr-calculator",
        "summary": "CIDR Calculator",
        "description": "Calculate network, broadcast, subnet mask and host counts from CIDR notation, or summarize any IP range into minimal CIDR blocks. IPv4 + IPv6 — free.",
        "tags": [
          "Web & Network"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "cidr",
                      "range"
                    ],
                    "description": "\"cidr\" analyzes one CIDR block (network, broadcast, masks, host counts). \"range\" summarizes an arbitrary start-end IP range into the minimal set of CIDR blocks."
                  },
                  "cidr": {
                    "description": "Required when mode is \"cidr\". IPv4 or IPv6 CIDR notation, e.g. \"192.0.2.0/24\" or \"2001:db8::/32\". IPv4 rejects leading zeros and short/hex forms; IPv6 accepts one \"::\" compression and embedded IPv4 tails.",
                    "type": "string",
                    "maxLength": 128
                  },
                  "normalize": {
                    "description": "When false (default), a CIDR with host bits set (e.g. \"10.0.0.1/8\") fails with errorCode HOST_BITS_SET and a suggestion field carrying the network CIDR. When true, the address is masked to its network and the result has normalized=true.",
                    "type": "boolean"
                  },
                  "start": {
                    "description": "Required when mode is \"range\". First address of the range, IPv4 or IPv6.",
                    "type": "string",
                    "maxLength": 128
                  },
                  "end": {
                    "description": "Required when mode is \"range\". Last address of the range, same family as start and not smaller.",
                    "type": "string",
                    "maxLength": 128
                  }
                },
                "required": [
                  "mode"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "family": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "ipv4",
                                "ipv6"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Detected address family, null on error."
                        },
                        "error": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Human-readable error message, null on success."
                        },
                        "errorCode": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Machine-readable error code such as HOST_BITS_SET, INVALID_CIDR, FAMILY_MISMATCH or RANGE_ORDER."
                        },
                        "suggestion": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "On HOST_BITS_SET, the normalized network CIDR to retry with (or pass normalize=true)."
                        },
                        "cidr": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "The normalized CIDR that was analyzed (cidr mode)."
                        },
                        "network": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Network (first) address of the block."
                        },
                        "broadcast": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Broadcast address. IPv4 /30 and shorter only — null for IPv6, /31 (RFC 3021) and /32."
                        },
                        "firstUsable": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "First usable host address."
                        },
                        "lastUsable": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Last usable host address."
                        },
                        "totalHosts": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Total addresses in the block, as a decimal string (can exceed 2^53)."
                        },
                        "usableHosts": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Usable host addresses as a decimal string: total-2 for IPv4 /30 and shorter, 2 for /31, 1 for /32; total for IPv6, 2 for /127, 1 for /128."
                        },
                        "subnetMask": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Dotted subnet mask, IPv4 only."
                        },
                        "wildcardMask": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Dotted wildcard (inverse) mask, IPv4 only."
                        },
                        "normalized": {
                          "type": "boolean",
                          "description": "True when the input had host bits set and was masked to its network address."
                        },
                        "rangeStart": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Start address of the analyzed range (range mode)."
                        },
                        "rangeEnd": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "End address of the analyzed range (range mode)."
                        },
                        "rangeCount": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Number of addresses in the range, as a decimal string."
                        },
                        "cidrs": {
                          "anyOf": [
                            {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Minimal exact CIDR decomposition of the range (range mode)."
                        }
                      },
                      "required": [
                        "family",
                        "error",
                        "errorCode",
                        "suggestion",
                        "cidr",
                        "network",
                        "broadcast",
                        "firstUsable",
                        "lastUsable",
                        "totalHosts",
                        "usableHosts",
                        "subnetMask",
                        "wildcardMask",
                        "normalized",
                        "rangeStart",
                        "rangeEnd",
                        "rangeCount",
                        "cidrs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/number-base": {
      "post": {
        "operationId": "number-base",
        "summary": "Number Base Converter",
        "description": "Convert numbers between binary, octal, decimal, hexadecimal and any base 2-36 online. Arbitrary precision, clear digit errors — free.",
        "tags": [
          "Format & Parse"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string",
                    "maxLength": 10000,
                    "description": "The number to convert, written in fromBase. Digits 0-9 and a-z (case-insensitive); optional leading - or + sign. 0x/0b/0o prefixes are accepted only when they match fromBase (16/2/8). Negative values convert sign-magnitude: the minus sign is carried to every output."
                  },
                  "fromBase": {
                    "type": "integer",
                    "minimum": 2,
                    "maximum": 36,
                    "description": "The base the value is written in, 2-36."
                  },
                  "toBase": {
                    "description": "Optional extra base to convert into, returned as custom.",
                    "type": "integer",
                    "minimum": 2,
                    "maximum": 36
                  }
                },
                "required": [
                  "value",
                  "fromBase"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "result": {
                      "$schema": "https://json-schema.org/draft/2020-12/schema",
                      "type": "object",
                      "properties": {
                        "binary": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Base-2 representation."
                        },
                        "octal": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Base-8 representation."
                        },
                        "decimal": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Base-10 representation."
                        },
                        "hexadecimal": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Base-16 representation, uppercase A-F."
                        },
                        "custom": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Value in toBase when one was provided, otherwise null."
                        },
                        "error": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Error message when the input could not be converted."
                        }
                      },
                      "required": [
                        "binary",
                        "octal",
                        "decimal",
                        "hexadecimal",
                        "custom",
                        "error"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ok",
                    "result"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or execution error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error",
                    "issues"
                  ]
                }
              }
            }
          }
        }
      }
    }
  }
}