npm Lockfile Conflict Resolver

npm Lockfile Conflict Resolver

Three-way comparison in your browser · no npm install or registry request

1. Select base and two branches

All three files must be npm package-lock.json v3 for the same project. Base is the common file before the branches diverged.

No file selected
No file selected
No file selected

4 MiB per file · 5,000 package locations per lockfile · 1,000 conflicts maximum

Select three lockfiles or load the example.

Comments & questions

npm Lockfile Conflict Resolver

A line-based Git conflict in package-lock.json makes it hard to keep each package's version, download URL and integrity token together. This tool compares a common base with two npm v3 lockfile branches by package location. Independent edits merge automatically, while divergent edits at the same location require you to select the complete left or right record. It then checks required package locations and a bounded set of version ranges. The result is a review aid, not a guarantee that installation will succeed.

Key features

  • Compare three npm package-lock.json v3 files against a common base
  • Merge independent package locations and unrelated root dependency declarations
  • Keep version, resolved URL and integrity together in each selected package record
  • Block export when a required package is missing or a supported range conflicts
  • Allow lockfile download only after every conflict is chosen and blocking issues are cleared
  • Download a separate JSON report with decisions, unresolved items and warnings

How to use

  1. Select the pre-branch common package-lock.json v3 as Base and the two edited files as Left and Right.
  2. Analyze the three files and review automatically merged locations and conflicts requiring a decision.
  3. For each conflict, choose the branch whose complete package record or root declaration to retain.
  4. Review blocking issues; if necessary, correct a branch lockfile and run the analysis again.
  5. Download the merged file and review report, then validate them with your own package.json and npm workflow.

Use cases

  • Combine branches that added different dependencies
  • Review a Git conflict after two branches upgraded the same package differently
  • Check selected root declarations against the resulting locked versions
  • Record merge choices and remaining cautions for code review

Frequently asked questions

Can it merge Yarn, pnpm, Bun or package-lock v1/v2 files?

No. It accepts only npm package-lock.json with lockfileVersion 3 and a packages map. Other formats are rejected rather than converted silently.

What happens if both branches edit the same package?

You choose the complete package record from one branch. The tool never combines a version from one side with an integrity token from the other. A selected deletion is also kept as that branch represents it.

Does an available download mean npm ci will pass?

No. This tool checks only a bounded set of numeric version ranges and required package locations. Peer and optional dependencies, workspaces, platform conditions, npm flags and package.json alignment require separate checks in your project.

Does it prove which integrity token is correct?

No. If the same version and resolved URL have disagreeing integrity tokens, export is blocked. The tool neither downloads packages nor verifies their hashes; investigate externally and regenerate the lockfile.

Are the files uploaded?

No. Comparison runs in your browser. Each file may be up to 4 MiB, each lockfile up to 5,000 package locations, and the merge up to 1,000 conflicts. A downloaded result can still contain selected private registry URLs.

Privacy

The three files are read only in this browser tab. This tool does not send them to its server or contact an npm registry. A merged file or report is saved only when you choose to download it. Selected private registry URLs remain in the downloaded lockfile, so review it before sharing.

Related Tools

Three Way Text MergeJSON Structure DiffFile 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 AuditorSource 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 DesignerHex File EditorBinary Patch WorkbenchFile 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 InspectorMarkdown Table GeneratorBase64 EncoderJSON FormatterURL EncoderSQL FormatterCron Expression GeneratorRegex TesterUUID GeneratorHash GeneratorTimestamp ConverterJWT DecoderHTML Entity ConverterMarkdown PreviewCSS MinifierMeta Tag GeneratorJSON ↔ CSVCase ConverterImage to Base64
Explore all Dev Tools tools →Image/Media →Text/Convert →Life/Fun →