Read single bits and bit fields (ranges) of the input number:
- positions as a list: 2, 12, 4-7, 7:4 (0 = LSB); invalid, negative,
duplicate or too large positions are skipped and reported
- interactive bit strip: click to toggle a bit, drag or Shift+click to
add a field, keyboard navigation with arrow keys
- results table with click to copy, overlap hints and optional field
values in hex, octal, base64, a custom base and decimal
- positions and selected bases are kept in the URL and local storage
Compare two pasted XML documents and highlight the differences, mirroring
the JSON diff tool's UI and diff engine. XML is parsed with a native
DOMParser-based normalizer (attributes as @name, text-only leaves as plain
strings) instead of xml-js, and a reconciliation step coerces mismatched
single/repeated element shapes into arrays before diffing so a repeated
element compares cleanly instead of producing a garbled type-mismatch diff.
From PR #1840Fix#1839
Co-Authored-By: @sharevb
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
n-input-number emits null when its text is cleared, while the computeds only
treated undefined as a missing value. The arithmetic then coerced null to 0,
so emptying To showed -100 and emptying X showed 0.
The three formulas moved into a service that treats null and undefined alike,
with unit tests for the cleared cases and an e2e case that clears a filled
field.
From PR #1913Fixes#1906
Paste an image from the clipboard with Ctrl+V or Cmd+V, or with a
"Paste from clipboard" button for touch devices, then download it.
- Converts to PNG (default), JPEG, or WebP, with a quality slider for
JPEG and WebP. The format and quality persist across visits.
- Keeps every image pasted in the session, with remove and clear all.
- Shows dimensions, original and output type and size.
- Edits the file name, copies the image as PNG, or copies a base64
data URL.
- Converts images one at a time in the browser only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PEUYi3h8enZM5rmJAZ1UAF
Taken from https://github.com/CorentinTh/it-tools/pull/1912/changes/d19824e7ea42a192808b585f02e2479d6fe87cb3
Co-Authored-By: @destan
Add a tool that cleans terminal and Claude Code output. The cleaner strips line numbers, ANSI escape sequences, box drawing, bullet markers, diff markers, trailing whitespace, and the common indent. Smart unwrap and Markdown / Reddit mode are optional. Options persist in localStorage. The pasted input is not saved.
Co-Authored-By: @destan
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PEUYi2gRxcytxRFXjPjH3U
Add an Automation category with three tools for PLC programmers and
instrumentation technicians, built on a shared AnalogSignalConverter
component and a tested src/utils/analog-signal.ts module:
- 4-20 mA converter: current <-> engineering value, 4-20 / 0-20 mA, with the
NAMUR NE 43 loop diagnostic (failure, undefined zone, under/over-range)
- 0-10 V converter: 0-10, 2-10, 0-5, 1-5 and ±10 V, warns below the live
zero (broken wire)
- Analog scaling calculator: raw PLC values (Siemens 0-27648 / ±27648,
Schneider 0-10000, 12/15/16 bits) <-> engineering value, with the rounded
raw value
Three-column layout: input, parameters and output, each side with a gauge and
a coloured status. A swap button inverts the conversion direction and keeps
the operating point. Also shows the y = gain × x + offset formula for the PLC
and a 0-25-50-75-100 % reference table. Ranges are validated (min < max).
English and French translations.
dns-query calls Cloudflare DNS over HTTPS and rdap.org, so offline mode
now hides it like dns-queries.
The gitattributes download commands are now built from the URLs the
preview was generated from. When the snapshot was used, they point at the
snapshot commit instead of master, so they reproduce what is shown.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Offline, explainshell now always uses the configured explainchain.url.
Before, a URL the browser had stored earlier (the public
explainshell.com) overrode it.
ocr-image's lang-url template may now name the file
(.../{lang}.traineddata.gz). tesseract.js appends that file name itself,
so the template is reduced to its directory instead of requesting a
duplicated path.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Add json-schemas.catalog-url, currency-converter.url and
geo-coordinates-converter.tile-url. Offline without a mirror, schema
validation offers custom schemas only, the map is not shown and the
currency converter is hidden. Show the external-access badge on the
YAML viewer and the coordinates converter.
Refs sharevb/it-tools#571
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Offline mode uses the snapshot only; online, it replaces the hardcoded
fallback list when GitHub can't be reached. Refresh it with
pnpm script:update:git-templates.
Refs sharevb/it-tools#571
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Ship the ONNX runtime, the ffmpeg core, the tesseract worker and core and
English/Simplified Chinese OCR data instead of loading them from
jsdelivr. They load only when their tool runs and are left out of the
PWA precache. Models and other OCR languages can come from an intranet
mirror (transformers.models-url, ocr-image.lang-url). Remove math-ocr's
leftover MathJax typings: MathJax is no longer used.
Refs sharevb/it-tools#571
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The root-absolute /Beep.mp3 (also fixed in pomodoro-timer, in the previous commit) broke when IT-Tools is served from a subfolder.
Refs sharevb/it-tools#571
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
md-editor-v3 loaded highlight.js, katex, mermaid, prettier, cropper,
screenfull and echarts from unpkg.com; the two other tools loaded Google
Fonts. All of them now come from the app.
Refs sharevb/it-tools#571
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
"offline": true in tools-settings.json hides tools that need internet
access (menus and routes). Tools declare it with requiresInternet, either
always or unless an intranet mirror is configured. The settings helper
lives in a module without top-level await so eagerly loaded tool
index.ts files can use it without delaying app boot.
Refs sharevb/it-tools#571
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Add fonts, md-editor extensions, the ffmpeg core, the tesseract core and
English/Simplified Chinese OCR data so tools stop loading them from
third-party CDNs. Remove currency-exchanger-js and @ffmpeg/util, which
nothing imports anymore. Patch curlconverter to resolve its wasm files
against the page's <base href> so curl-converter works in a subfolder.
Refs sharevb/it-tools#571
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The database name, account and server address are prefilled from URL query
parameters and were pasted into the script as is, so a crafted link could
add statements to the SQL a user copies and runs (e.g. a database name
containing `` `; DROP DATABASE prod; -- ``). A password containing `'` also
produced invalid SQL.
- Quote identifiers and string literals per dialect.
- PostgreSQL passwords containing a backslash are emitted as E'' strings,
which parse the same whatever standard_conforming_strings is set to.
- Oracle has no escape for `"` in quoted names or passwords, so either one
containing `"` shows a validation error instead of generating SQL. Plain
Oracle names stay unquoted since quoting makes them case-sensitive.
- Newlines in values that land in SQL comments are flattened.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`src/utils/random.ts` was built on Math.random(), and it backs the token
generator, htpasswd salts and the passphrase suffixes. The PIN code
generator and the database builder's default password called Math.random()
directly. All now go through crypto.getRandomValues() with rejection
sampling, so indices are unbiased, for ranges up to 2^53.
The passphrase generator no longer calls generateSillyPassword(), which also
picks words with Math.random(). It uses the package's word lists with the
secure helpers, and skips pulling lodash and zxcvbn into the bundle.
Behaviour changes that came with it:
- randIntFromInterval() now includes its upper bound. The lorem ipsum
sliders could never reach their maximum and the passphrase generator never
put a number on the last word. The coin flipper used `0..10 % 2`, which
would be biased with an inclusive range, so it now draws 0 or 1.
- randIntFromInterval() orders reversed bounds, rounds fractional ones
inward and returns NaN for non-finite input instead of throwing.
- The lorem ipsum generator falls back to its defaults for malformed
`paragraphs`, `sentences` and `words` URL values and clamps them to the
slider ranges, so a link like `?sentences=[1,4294967297]` cannot freeze
the page.
- Passphrases whose length equals the min or max length are accepted.
- Multi-word list entries ("wide eyed") count as one word, so the word count
and number placement match the settings.
- Token generator draws each character independently instead of shuffling
the alphabet repeated `length` times.
Fixes the CodeQL js/insecure-randomness alert in the passphrase generator.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
String replace() only replaced the first `[`, `]`, `(` and `)`, and link
text backslashes were left as is. Use global regexes and escape
backslashes too.
Fixes CodeQL js/incomplete-sanitization alerts in the tool layout.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Turndown only applies rules to element nodes; text nodes always go through
its built-in escape(). The `escapeText` rules and their `escapeMarkdown`
helpers in HTML to Markdown, HTML to data and EPUB to Markdown were never
called. They also escaped `|` twice, which would have produced `\\|` had
anyone wired them up. Output is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pipes were escaped but backslashes were not, so a cell ending in `\` turned
the added `\|` into `\\|` and the pipe split the cell. The object-array
Markdown export also left newlines in cells, which broke the row; they now
become `<br>` like in the Markdown table generator.
Fixes CodeQL js/incomplete-sanitization alerts in the Markdown table
generator and the object-array export.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Unescaping backslashes before `\n`, `\t` and friends decoded escaped
backslashes twice: `\\n` in an escaped JSON string became a raw newline
instead of `\n`, so parsing failed with "invalid character". A single
replace with a lookup table decodes each escape exactly once.
Fixes the CodeQL js/double-escaping alert.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The comment check passed its pattern as a string, so every `\s` became a
literal `s`. Lines starting with `s` that contained `//` or ended in `/`
(e.g. `site = https://example.com`) were dropped as comments. Lines are
already trimmed, so only `//` and lone `/` lines need skipping.
`spacesRegx` and `newLineRegx` lacked the global flag: prop names kept all
but their first space, and whitespace-only lines were treated as content.
Fixes CodeQL js/useless-regexp-character-escape and js/incomplete-sanitization
alerts in src/utils/objgen.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(bundle): improve initial load + loading of tool
Render the sider once and only build the parts of it that are visible.
- App.vue renders BaseLayout around the layout switch instead of inside each
layout, so moving between a plain route and a tool route no longer unmounts
and rebuilds the whole sider (~460 menu items) on every navigation.
- CollapsibleToolMenu mounts a category's items the first time it opens. Every
category starts collapsed, so the menu was built entirely out of view.
- Its menuOptions computed no longer folds in the collapsed/active flags, which
rebuilt every category's tools array -- and re-rendered every item -- per route
change. They are read from the template instead.
- MenuItemTooltip measures truncation with scrollWidth/clientWidth rather than a
canvas measureText(), dropping a throwaway <canvas> and a getComputedStyle per
menu item.
Production build, 3 runs each, fresh profile per run:
first contentful paint 2476-2735ms -> 814-974ms
main-thread blocking 1806-2024ms -> 250-294ms
requests at boot 384 -> 208
click a tool from home 991-1014ms -> 178-197ms
switch between tools 281-322ms -> 74-125ms
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Fix small width in mermaid exporter
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: sharevb <sharevb@gmail.com>