Route Order Optimizer

Route Order Optimizer

Enter the longitude and latitude of your stops and choose where to start and finish. Compare the input order with a shorter calculated sequence. A dynamic program finds the exact minimum for up to 11 points; 12–18 points use nearest neighbor followed by 2-opt improvement. Distances follow either a great-circle spherical model or an explicit local-plane approximation. This does not model roads, traffic or travel time.

Distance and endpoints

Up to 18 stops. At most 11 stops receive an exact solution; larger sets receive a heuristic result.

Distances are in km. Both models are straight-line coordinate estimates, not road lengths.

5 stops

Optimization result

7.746 kmCalculated order distance

10.991 kmCurrent input order distance

29.5%Saving against input order

Exact minimum for the chosen model and constraints

  1. Seoul City Hall
  2. Namdaemun Market0.816 km
  3. N Seoul Tower1.329 km
  4. Bukchon Hanok Village3.501 km
  5. Gwanghwamun1.050 km
  6. Seoul City Hall1.050 km
Straight-line sketch of the visit order

This is a straight-line coordinate sketch, not a road map or precise projection.

Import and export

Editable JSON includes the distance settings. Point CSV requires id,label,longitude,latitude; importing it sets the first row as the start.

Sample stops are ready.

Comments & questions

Route Order Optimizer

Enter the longitude and latitude of your stops and choose where to start and finish. Compare the input order with a shorter calculated sequence. A dynamic program finds the exact minimum for up to 11 points; 12–18 points use nearest neighbor followed by 2-opt improvement. Distances follow either a great-circle spherical model or an explicit local-plane approximation. This does not model roads, traffic or travel time.

Key features

  • Fixed start, optional fixed end or return to start
  • Choose spherical great-circle or local-plane approximate distance
  • Clearly separate exact tours through 11 stops from heuristic tours through 18
  • Compare total distance and saving against the current input order
  • Import and export validated editable JSON and point CSV
  • Save an ordered itinerary CSV and straight-line SVG sketch

How to use

  1. Use the sample or edit the stop labels, longitude and latitude; add points if needed.
  2. Select the distance model, fixed start and optional end or return-to-start condition.
  3. Calculate the route and check whether the result is exact or heuristic.
  4. Compare its total with the original input order and inspect the sketch.
  5. Save editable JSON, points CSV, itinerary CSV or SVG.

Use cases

  • Draft a straight-line order for several locations before checking a road map
  • Learn how exact small tours compare with a heuristic on larger sets
  • Share stop coordinates and ordered segment distances in CSV

Frequently asked questions

Can this give driving or walking directions?

No. Road connections, one-way streets, traffic, slopes and schedules are not loaded. The result is a straight-line coordinate exercise.

When is the order guaranteed optimal?

For up to 11 stops, the selected distance model and start/end/return constraints receive an exact minimum. With 12 or more stops, the heuristic is not guaranteed to be globally optimal.

What coordinate order do I enter?

Longitude first, then latitude. Only 2D longitude from −180 to 180 degrees and latitude from −90 to 90 degrees are supported.

How does the local-plane approximation differ from great circle?

Great circle estimates the shortest arc on a sphere. The plane approximation scales east–west separation by mean latitude and is suited to nearby points; long distances and polar regions can carry larger error.

Are my points saved on a server?

No. Points and calculations remain in the current browser memory. Export JSON or CSV before closing the page if you want to keep them.

Privacy

Stop coordinates are processed in the current browser only. No map tiles or routing APIs are requested, and this tool does not store your points on a server.

Related Tools

GeoJSON Map EditorRandom GeneratorJSON ↔ CSVWasm 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 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 RenamerFile Manifest VerifierFolder Space MapFolder Difference ReviewerPolygon 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 GeneratorHash GeneratorTimestamp ConverterJWT DecoderHTML Entity ConverterMarkdown PreviewCSS MinifierMeta Tag GeneratorCase ConverterImage to Base64
Explore all Dev Tools tools →Image/Media →Text/Convert →Life/Fun →