Compass direction to bearing
SW by S, Southwest by South, is 213.75°: write a direction the way a pilot book or an old ship's log does, and get the heading in degrees clockwise from true north. Short forms like NbE and full names both work. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Name
- SW by S
- Canonical
- SWbS
- Display
- Southwest by South
- Bearing deg
- 213.75
- Point index
- 19
This compass direction to bearing converter turns a traditional thirty-two-point compass rose name into a numeric heading in degrees measured clockwise from true north. Mariners, surveyors, hikers, and game developers still write directions as N, NE, NNE, NbE, or longer forms such as Southwest by South and SW by S; this tool resolves those labels to exact multiples of eleven point two five degrees on the standard rose. Examples you can check immediately include North at zero degrees, Northeast at forty-five, East at ninety, South at one hundred eighty, Southwest by South at two hundred thirteen point seven five, and North-Northeast at twenty-two point five.
Reading the 32-point rose and your result
The classic marine compass rose divides the full circle into thirty-two named points spaced eleven point two five degrees apart. Starting at North as index zero and zero degrees, the sequence runs North by East, North-Northeast, Northeast by North, Northeast, and so on through East, South, West, and back to North by West at three hundred forty-eight point seven five degrees.
This converter accepts both short abbreviations such as N, NE, NNE, NbE, SWbS, and WNW, and expanded English forms such as North, Northeast, Southwest by South, East by North, and North-Northwest. Spacing, hyphens, and letter case are normalized so SW by S, swbs, and Southwest by South resolve to the same point when they refer to the standard label.
Where compass-to-bearing conversion fits in navigation, education, and software
Navigators still meet thirty-two-point language in coastal pilots, historical logs, and traditional sailing courses that say haul Southwest by South rather than two hundred thirteen degrees. Outdoor educators convert trail notes written with NNE or WNW into map bearings before plotting a course. Game and simulation developers map wind labels, spawn facing directions, and compass UI strings onto engine yaw angles without hand-maintaining a fragile local table.
Cartography students verify that Northeast is forty-five degrees and that Southeast by East is one hundred twenty-three point seven five before labeling a rose diagram. Data pipelines that ingest weather bulletins or archival ship journals normalize free-text points into numeric headings for analytics. Use a reverse bearing-to-name tool if you need the opposite direction of conversion, and pair with rhumb or great-circle distance calculators when the next step is path length rather than label decoding.
What you can do with it
Chart and pilot book notes
Turn traditional compass phrases such as SW by S or North by East into numeric bearings for plotting courses and labeling roses.
Games, sims, and education
Map wind, heading, and compass UI labels to engine degrees for classrooms, simulations, and outdoor lesson plans.
FAQ
What does the compass direction to bearing converter cost?
It is free in your browser on this page.
Which name forms are accepted?
Short abbreviations (N, NE, NNE, NbE, SWbS), spaced by-forms (SW by S), and full English names (Southwest by South, North-Northeast). Matching is case-insensitive.
What happens if the name is not a recognized compass point?
Empty strings, pure numbers, and unknown tokens never produce a guessed bearing.
Does this apply magnetic declination or true/magnetic conversion?
No. It only maps the standard 32-point name table to degrees from north. Magnetic variation and grid bearings are out of scope.
Where do NNE and the by-points fall on the rose?
Cardinals sit at 0, 90, 180 and 270 degrees, and intercardinals such as NE at multiples of 45. Points like NNE take the half-steps between them, and by-points such as North by East fill the remaining 11.25-degree steps.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/geo/compass-to-bearing \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"SW by S"}'const res = await fetch("https://api.kit.forhosting.com/geo/compass-to-bearing", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "SW by S"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/geo/compass-to-bearing",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"name": "SW by S"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/geo/compass-to-bearing", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"name":"SW by S"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"name":"SW by S"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/geo/compass-to-bearing", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"name": "SW by S"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "geo.compass_to_bearing",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_name_len | 64 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
The engine is a pure deterministic table lookup with no magnetic model, no network call, and no random sampling: either the name matches a recognized thirty-two-point label or the request fails with invalid_input.
What the thirty-two-point rose is and what the response returns
The response includes the original name string you sent, a canonical abbreviation such as SWbS, a human-readable display name, the bearing in degrees from north clockwise, the zero-based point index, the constant points_total of thirty-two, the step size of eleven point two five degrees, a method tag thirty-two_point_compass, and a short formula reminder. There is no magnetic declination correction and no conversion from degrees back to a name: the page answers only name-to-bearing. Unrecognized tokens, empty strings, pure numeric degrees, and strings longer than the documented limit are rejected with invalid_input so a typo never becomes a silent wrong heading. Pair this tool with other geo endpoints when you need distances or coordinate transforms; keep this one for label-to-degree mapping that stays identical across browser and API runs.
How names are read and why bearings stay reproducible
Cardinals N, E, S, and W map to zero, ninety, one hundred eighty, and two hundred seventy degrees. Intercardinals NE, SE, SW, and NW sit at forty-five degree multiples. Intermediate points such as NNE, ESE, and WSW occupy the half-steps at twenty-two point five degree offsets, while the eight by-points such as North by East and Southwest by South fill the remaining eleven point two five degree slots. The preferred input field is name, but aliases direction, compass, point, and bearing_name are accepted so forms, spreadsheets, and query strings can reuse the same contract without renaming columns. The parser trims outer whitespace, lowercases letters, and strips punctuation and spaces for lookup, which is why SW by S and SWbS share a path when aliases register both compact and by-forms. Bearing is computed as point_index times three hundred sixty divided by thirty-two, which is exactly index times eleven point two five, then rounded to a stable four decimal places so JSON goldens compare cleanly without floating-point noise. Free browser runs on this page match the priced API result, so you can prototype interactively and then automate without re-implementing the rose table yourself.
Where compass-to-bearing conversion fits in navigation, education, and software
On this page every conversion runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced identical API — matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result.
Integration use cases
Deterministic test fixtures
Generate reproducible bearing_deg values and canonical abbreviations for unit tests, navigation demos, and CI assertions.
Technical questions
How is the bearing calculated from a compass name?
Each of the 32 points has an index from 0 (North) to 31 (North by West). bearing_deg = point_index × (360/32) = point_index × 11.25, measured clockwise from north.