Binary Patch Workbench

Binary Patch Workbench

Browser-local patching · file bytes stay on this device and source files are never overwritten.

1. Choose operation

Base/target files up to 2 MiB each · patch up to 3 MiB · TTBP version 1 only. Multi-MiB files may take a moment to calculate.

2. Choose local files

Choose files to begin.

Comments & questions

Binary Patch Workbench

Compare two local files by bytes and make a version 1 .tbp patch that reuses consecutive regions of the base file while storing changed bytes. Immediately apply the newly serialized patch to check that it reconstructs exactly the target bytes. Apply mode accepts a patch from another device and verifies both the base and resulting SHA-256 values. Unlike manual offset editing or line-based text diff, this tool produces a patch that can recreate a binary result.

Key features

  • Create copy-from-base and add-new-bytes commands from two local files
  • Embed base and target sizes, SHA-256 hashes and commands in the patch
  • Check the base hash before applying and the target hash after reconstruction
  • Reject truncated patches, unknown versions or commands, and out-of-range spans
  • Fall back to literal target bytes when a difference patch would be larger

How to use

  1. In Create mode, choose base and target files up to 2 MiB each, or load the sample.
  2. Create the patch and review the automatic round-trip check, copy/add byte counts and both SHA-256 hashes.
  3. Download the .tbp patch and share it with someone who has the exact base file.
  4. In Apply mode, select that base file and the .tbp patch, then apply it.
  5. Download the restored file after both base and target integrity checks pass.

Use cases

  • Share a small binary change with a team that already has a common base file
  • Archive two test-fixture versions as a reproducible patch
  • Check whether an incoming patch matches the local base by hash
  • Detect when a damaged patch changes reconstructed bytes

Frequently asked questions

Can I apply a patch to any base file?

No. The base size and SHA-256 must exactly match the file used to create the patch. A different base is rejected before producing a result.

What is the .tbp format?

It is this site's TTBP version 1 binary format. An 84-byte header stores the version, sizes, operation count and two SHA-256 hashes, followed by copy-from-base and add-bytes commands. It is not compatible with bsdiff or xdelta files.

Is the patch always smaller than the original?

No. Many changes or a very small file can make the patch larger because of the header. When copying is not useful, the target bytes are stored literally to favor a correct round trip.

What are the file and operation limits?

Base and target files are each limited to 2 MiB, patches to 3 MiB and operations to 16,384. Processing uses browser memory rather than streaming large files.

Does SHA-256 verification prove the file is safe?

No. It verifies exact base and result bytes, but does not authenticate the patch author or establish that a file is safe to execute.

Privacy

Files are read and compared only in memory in this browser tab. File bytes are not sent to the site, ads or analytics, and source files are never overwritten. Patch and verified result downloads begin only when you request them.

Related Tools

Hex File EditorHash GeneratorFile Manifest VerifierWasm Module InspectorHreflang Matrix CheckerAST Query PlaygroundContainer Build GraphDependency Graph ExplorerSemver Range LabCron Schedule AuditorPatch Review WorkbenchSource Map ExplorerLocalization Catalog AuditorStructured Data ReviewerHTTP Archive AnalyzerWebhook Signature LabProtobuf Schema WorkbenchGraphQL Schema LabAvro Schema EvolutionLocal SQL WorkbenchSchema Form BuilderMesh Repair WorkbenchPipe Network LabRobot Arm Kinematics LabThermal Network LabBeam Response LabGear Train DesignerTolerance Stackup LabSensor Calibration FitPCB Stackup PlannerDigital Filter DesignerNetwork Reachability MapSun Shadow MapGPS Error SimulatorDigital Logic SimulatorAnalog Circuit LabMechanism Linkage LabAnalysis Mesh GeneratorOpenAPI Contract InspectorDatabase Migration PlannerDimensional Equation CheckerTruss Force LabBoolean Minimization LabControl Response LabQueueing Simulation LabGeofence Event SimulatorCoordinate Reference LabSurvey Traverse LabRaster Classification LabChoropleth Design LabMap Print ComposerRaster Reprojection LabElevation Contour MakerTerrain Viewshed LabWatershed DelineatorMap Tile PackagerText File Encoding WorkbenchFilesystem Portability AuditorSBOM License ExplorerFile Signature Auditornpm Lockfile Conflict ResolverSource Secret AuditorOffline Web Package BuilderCertificate Chain InspectorTorrent Metainfo InspectorChunked File PackagerEncrypted File VaultDuplicate File FinderArchive WorkbenchDesign Token ManagerSpacing Token DesignerResponsive Type SystemPackaging Dieline DesignerSVG Icon Sprite PackerFlex Layout PlaygroundCSS Grid PlaygroundRegex Equivalence LabMarkdown Repository AuditorLog Template MinerResponsive Layout AuditorEmail Template PreviewInternal Link GraphState Machine TesterPetri Net SimulatorGit History VisualizerCurl Request WorkbenchBinary Protocol DesignerFile Signature WorkbenchAPI Mock SandboxSchema Column MapperEvent Log SessionizerER Diagram DesignerTime Series Gap AuditorStratified Data SplitterData Lineage DesignerDecision Tree LabData Anonymization WorkbenchData Expectation RunnerJSON Schema ValidatorBasket Pattern AnalyzerRobots Policy TesterSEO HTML AuditorAccessibility Structure AuditorSyndication Feed WorkbenchIndexNow Payload BuilderCrawl Log AnalyzerCSP Policy WorkbenchSearch Performance AnalyzerCSV Formula Risk AuditorCORS Response SimulatorCache Header LabCookie Policy InspectorWeb Vitals Trace LabSitemap Health AuditorBatch File RenamerFolder Space MapFolder Difference ReviewerRoute Order OptimizerGeoJSON Map EditorPolygon Overlay LabCartographic Label PlacerSpatial Table JoinGeoJSON Topology AuditorGPX Track AnalyzerTrack Privacy RedactorCSV Table JoinCSV Pivot WorkbenchScientific Data ProfilerTabular Cleaning WorkbenchRecord ReconciliationData Dictionary BuilderCanonical Graph AuditorRedirect Plan TesterHTTP response and ping reference testBrowser and System InformationJSON ↔ YAML ConverterXML ↔ JSON ConverterHTML FormatterJavaScript MinifierMock Data Generator.gitignore GeneratorLicense GeneratorUser-Agent ParserPassword Strength CheckerCode to ImageXML FormatterHTTP Status Code LookupMIME Type LookupJS & SQL String EscapeCSS Box Shadow GeneratorCSS Gradient GeneratorIndent ConverterNumber Base ConverterUnicode Escape ConverterUnicode InspectorJSON Structure DiffMarkdown Table GeneratorBase64 EncoderJSON FormatterURL EncoderSQL FormatterCron Expression GeneratorRegex TesterUUID GeneratorTimestamp ConverterJWT DecoderHTML Entity ConverterMarkdown PreviewCSS MinifierMeta Tag GeneratorJSON ↔ CSVCase ConverterImage to Base64
Explore all Dev Tools tools →Image/Media →Text/Convert →Life/Fun →