By matching a value with a unit, it can be converted into other units of the same category: length, area, volume, mass, temperature, speed, pressure, energy, power, data storage and time. The coefficients take the defined values of the International System of Units, the temperature is processed according to the scale formula, and all conversions are completed on this machine.
100% Browser local processing0 Data upload
🔁 Unit conversion
Select the unit and fill in a number in "Value". Click Convert to list the corresponding values of all units under this category; the results are given line by line and can be copied with one click.
Number of similar units
Fill in the value and select the unit and click ConvertConversion completed, results can be copiedThe value is invalid, please fill in the numberThere is no content to copy yetCopied to clipboardThis feature is currently unavailable
💡 Instructions for use
Before converting, first confirm which system the value comes from: metric, municipal and imperial systems have different values with the same name. It is more common to choose the wrong unit than to calculate the coefficient incorrectly.
Temperature is an affine scale with a zero point offset and cannot be directly obtained by using multiples; when it comes to thermodynamic calculations, first change it to Kelvin and then substitute it into the formula.
The number of reliable digits in the result depends on the precision of the input: when entering only three significant digits, do not copy the ten-digit number shown on the page.
Only change one category at a time: After selecting the unit, the results are listed by category. Values will not be given across categories because dimensions such as length and mass are not interchangeable.
What is given on the page is a general conversion coefficient, covering daily and conventional engineering scenarios; when used for acceptance, settlement or formula, the unit agreed in the contract or specification should prevail.
The longer the conversion chain, the greater the error. When converting multiple steps continuously, it is recommended to convert to the base unit first, and then return to the target unit at once to avoid repeated rounding.
📐 Caliber comparison: metric, municipal and imperial
The same name may correspond to different values in different systems, which is where conversion errors are most likely to occur. The metric system is based on meters, kilograms, and seconds, and the multiples are arranged in decimal order, and the conversion only needs to be multiplied by a coefficient; the municipal system is derived from traditional measurement, 1 kilogram is equal to 500 grams, and 1 acre is about 666.67 square meters, and there is no integer multiple relationship with the metric system; although the imperial system and the American system have the same name, they are not equal in terms of gallons, quarts, and tons. The American gallon is about 3.785 liters, and the imperial gallon is about 4.546 liters. When you see a number, first confirm which system it comes from, and then decide which coefficient to multiply. The most common confusion in daily life is gallons and tons. The former is divided into American and British systems, and the latter is divided into metric tons, long tons and short tons. When only ton is written on the document, be sure to ask the standard.
Identify the system first and then multiply the coefficients: it is more common to choose the wrong units than to calculate the wrong coefficients.
🎯 How to determine precision and significant figures
Conversion coefficients are divided into two categories: defined values and agreed values. Inches, pounds, knots, etc. are fixed by international agreements and are precise relationships. 1 inch is exactly equal to 2.54 centimeters, and 1 pound is exactly equal to 453.59237 grams. Others are agreed or measured values, such as 1 mu divided by 2000 by 3 square meters, and Mach 1 is converted according to the standard sea level speed of sound, which itself is rounded. The calculation uses double-precision floating point and has about 15 to 17 significant digits, but the number of reliable digits in the result is limited by the input: enter three significant digits and the result should not be written as tens. The page displays ten significant digits and removes the trailing zeros to facilitate truncation as needed; the rounding rules must also be determined before calculation. The mantissa may be different between rounding items one by one and then adding them and adding them first and then rounding them.
The number of reliable digits in the result is determined by the input, not by the number of digits displayed on the page.
🚫 Under what circumstances should you not use the conversion results directly?
In the third category scenarios, the original units should be retained. Acceptance and drawings are based on the marked units, and converted decimals will introduce unnecessary disputes; dosage, reagents, and baking ratios are required to be written in weighing units, and rounding after conversion may change the proportions; thermodynamic calculations with temperature conditions must be converted to Kelvin, and direct multiplication of the coefficient by degrees Celsius will result in incorrect results. If the units on the cross-border documents are inconsistent with those stipulated in the contract, the conversion value can only be used as a reference. Formal documents should use the units agreed by both parties. If necessary, the two sets of units should be written side by side, and the conversion coefficient and rounding method should be noted. In addition, there is no fixed number of days in a month and a year, and only agreed values can be used for time conversion. When it comes to the contract period, the start and end dates should be stated instead of the length.
Official documents are written in agreed units: the conversion value can only be used as a reference.
📊 How to read results: symbols and magnitudes
When reading the result, first look at the order of magnitude, and then look at the symbol: converting meters per second into kilometers per hour requires multiplying by 3.6, the value becomes larger and the unit becomes smaller, and the direction is easy to reverse; byte is written as a capital B, and bit is written as a lowercase b, a difference of 8 times, network speed and capacity are often confused here; milli, micro, and nanometers are each a thousand times different, and it is least likely to be misread when written in scientific notation. A unit is given per line on the page and is comparable between the same category but not across categories. If the result is negative, first check whether the input exceeds the physical lower limit, for example, Kelvin will not be less than zero; a result of zero means that the input is zero, not that the calculation failed. There is another difference in storage units: KB is expressed in one thousand, and KiB is expressed in one thousand and twenty-four. This is where the difference between the hard disk nominal name and the system display comes from.
Look at the magnitude first and then the sign: multiplying by 3.6 makes it bigger, dividing by 3.6 makes it smaller, and don’t reverse the direction.
There are two situations. The conversion is accurate when the coefficient is fixed by an international agreement, for example, 1 inch is equal to 2.54 centimeters, but it is truncated according to the significant digits when displayed; when the coefficient itself is an agreed value or a measured value, the result is approximate, for example, 1 mu is converted to 666.67 square meters, and 1 Mach is converted to the standard sea level sound speed. When used for acceptance or settlement, it should be written in the units and digits agreed in the contract, and the conversion value is for reference only.
Why do units with the same name have different values in different countries??
Because there are two systems, the British system and the American system. Gallons, quarts, pints, and fluid ounces are not equal under the US system and the British system. The US gallon is about 3.785 liters, and the British system is about 4.546 liters, a difference of nearly 20%; tons are also divided into metric tons, long tons, and short tons. When you see words like gal and ton, first confirm the country or standard of origin. The options on the page are listed separately in US and British systems. Select by source to avoid mixing.
Why can’t we use multiples for temperature conversion??
Because the temperature is an affine scale, there is a zero point offset, not just a proportional relationship. Between Celsius and Fahrenheit, you need to deal with the offset first and then multiply the ratio. 0 degrees Celsius is equal to 32 degrees Fahrenheit, and 100 degrees Celsius is equal to 212 degrees Fahrenheit; switching to Kelvin moves the zero point to absolute zero, and 0 degrees Celsius is equal to 273.15 Kelvin. Converting using multiples will give highly skewed results, and must be converted to Kelvin first when thermodynamic calculations are involved.
Can municipal units still be used??
It is still commonly used in daily life, but in formal occasions it has been unified into legal measurement units. Jin, liang, mu, and li are very common in agricultural products, real estate, and customary expressions. 1 jin is equal to 500 grams, and 1 mu is about 666.67 square meters. They are all rounded, so the conversion results often include decimals. The conclusion is that it can be used for daily communication. Contracts, bills and technical documents should be written in metric units. When they need to be juxtaposed, write both to avoid ambiguity.
How to determine the decimal places of the result?
Determined by the number of reliable digits entered, not by the number of displayed digits. Enter three significant digits and keep three to four digits in the result; when the coefficient is an exact value, the number of digits in the result can be changed as you enter. In engineering, it is usually rounded according to specifications, such as length in millimeters and mass in grams. Show the page to ten significant digits and remove the trailing zeros so you can truncate if necessary, but don't copy it directly into the official document.
Will the data be uploaded for conversion??
No. All conversions are completed by native scripts within the page. The input values and results only exist on the current page. No network requests are made, nor are they written to local storage. Therefore, you can safely handle values that are difficult to transmit externally, such as quotations, formulas, or drawing dimensions. If you want to save the results, you can click the copy button and paste it into your own document, or directly use the print function to generate paper records.
Why can’t I switch results across categories??
Because dimensions such as length, mass, and time are not interchangeable, the page groups units into categories, and only gives values within the same category. This approach can prevent errors such as "using meters as kilograms" and also reminds you to confirm which quantity the value in your hand belongs to before deciding which unit to choose.
This site is a mirror site and the function has been disabled
The content of this page comes from Hongmu Notes. The copyright and functions are only authorized to be used on the original site. Please visit the original site for the full experience:
Visit the original website www.4s5.cn
📝 Tool feedback
Does this tool have page clutter issues?
Does this tool function properly?
Verification Code: Please calculate the result
…
The verification code is incorrect or has expired; please re-enter it.
Thanks for your feedback! We will deal with and fix this issue as soon as possible after receiving it.
The verification code failed to load; please click ↻ to retry.Please first enter the CAPTCHA answer.
Appearance settings
color matching
Font size
first prizeThank you for participatingSecond Prizedo it againthird prizemystery giftOptionsAt parties or events, you usually strike up conversations with strangersAfter spending a whole day with many people, you will feel tired and need to be aloneYou like to be the center of conversationYou enjoy deep chatting with a few friends more than lively occasionsWhen you need to think, you are more willing to speak or write it out and discuss it with othersCold calls or last-minute invitations often make you feel stressedDuring breaks you tend to go out and meet friends instead of staying at homeYou believe more in facts you see with your own eyes than in abstract speculationsYou often imagine various possibilities for the futureInstructions or process steps are helpful to youYou are more likely to remember overall impressions than specific detailsYou like to use metaphors and associations to explain somethingYou focus more on what you need to do now rather than the long-term blueprintWhen reading a story, you care more about whether the plot is close to realityWhen making a decision, you will first look at whether the data and logic are validWhen a friend complains, your first reaction is to comfort him rather than give him advice.When a mistake is pointed out, you care more about the objectiveness of the reasons rather than the tone of voice.You will adjust your expression in order to maintain relationship harmonyWhen evaluating a plan, you first pay attention to its feasibility and efficiencyYou are easily affected by other people's emotionsDo you think fairness is more important than favor?Before you go on a trip, you are used to planning your itinerary clearly.A last-minute change of plans can make you feel excited rather than upsetYou are used to making to-do lists and completing them one by oneYour desktop or files are often placed casually but you can find them by yourselfYou feel uncomfortable when things are unresolved and tend to make decisions as quickly as possibleYou like to keep your options open and decide laterYou'll meet deadlines well in advance rather than rushing at the last minuteStrongly disagreeDisagreeNot sureAgreeStrongly agreeIndependent strategist: good at long-term planning, emphasizing logic and efficiency, and likes to put ideas into systems.Logic Explorer: Strong curiosity, likes to dismantle principles, and hates being bound by processes.Goal-driven commander: Good at coordinating resources and pushing the team to achieve results.Witty debater: has many ideas, quick reactions, and likes to challenge established conclusions.Advocates who understand people's hearts: value meaning and value, and be sensitive to the emotions of others.Idealists: Have clear values in their hearts and pursue truth and creation.Contagious leader: good at encouraging others and willing to promote cooperation.Passionate thinker: has broad interests and is good at connecting people and opportunities.Pragmatic Guardian: Reliable, rule-abiding, emphasizing facts and responsibilities.Meticulous protector: considerate, patient, and willing to silently support those around him.Efficient organizer: strong execution ability and habit of arranging things in an orderly manner.Enthusiastic Coordinator: Values interpersonal harmony and is willing to take care of the needs of the group.A calm doer: strong in practical skills, calm in situations, and good at troubleshooting.Gentle artist: Feels delicately and likes to express through actions rather than words.Flexible activist: quick to respond and willing to solve problems in actual combat.A dynamic performer who enjoys the moment and is good at heating up the place.If you suddenly have a whole day free on the weekend, you willInvite friends to go out for a walkCatching up on sleep and watching dramas at homeDepends on your mood, make a temporary decisionWhen joining a new group chat, you usuallySend an emoji first to enliven the atmosphereSilently watching everyone chattingDive first, and then chime in when you encounter a topic of interest.A friend asks you to do a difficult favor. What will you do?Commit first and then think of a solutionFirst assess whether you can do itExplain the difficulties directly and discuss them togetherBoth options have their own pros and cons, which one do you prefer?List the score sheet for item-by-item comparisonChoose the one that is more pleasing to your eyes based on your intuition.Try it on a small scale first before decidingWhen faced with a new task, your first step is toGet started right away and adjust as you goFind information first to get the full pictureTalk to people who have done it and talk about their experiencesWhen your plans are temporarily disrupted, youAdjust quickly and even get a little excitedIt's a bit annoying, but I'll do it againLet’s figure out the new goals first.Before making important decisions, you believe morePast data and experienceown feelingsAdvice from people around youIn the team you play more oftenperson who drives progressA person who sorts out logicThe person who harmonizes the atmosphereWhen learning new skills, you preferStart working on the project directlyRead the system tutorial firstFind an example and follow itWhen others criticize your work, you willFirst ask what exactly is wrongIt's a bit uncomfortable, but I'll remember itSay it's okay with your mouth, think about it laterThe ideal working condition isFast pace and lots of changesStable and predictableFree and able to make arrangements by oneselfyou would rather spend your timemeet different peopleDo one thing to the extremeTry new thingsCharge Captain: Sociable and decisive, able to quickly determine direction in chaos.Robust commander: He is good at leading people and also pays attention to steps. He is the anchor of the team.Passionate initiator: Driven by passion, he can often bring everyone together with just one sentence.Heart-warming executor: Cares about everyone's feelings and is willing to do the details well.Calm planner: Does not talk much, but has clear logic and quick judgment.In-depth researcher: Likes to study alone and pays attention to methods and causes and consequences.Intuitive Creator: Feels strongly inside and acts quickly when inspiration comes.Still water deep flow type: sensitive, patient, good at polishing one thing for a long time.S gregariousL aloneH mindF heartQ fast paceM slow pace(living in groups% 、 头脑% 、 快节奏Custom colorDrag the image here, or click to upload<p>Supports common image formats such as JPG, PNG, WebP, GIF, and BMP<br>You can also directly<kbd>Ctrl</kbd>+<kbd>V</kbd>Paste picture<br> Once processing is complete, you can download the items one by one, or package them into a ZIP file for one-click download.</p>➕ Continue to add⬇ Download all✕ Clear the listNo files yet, please upload pictures<p>共 <strong>{n}</strong>files</p>Processing…Processing completedImage loading failedPlease upload image fileList clearedRemovedDownloadPreviewCloseProcessing result previewDownload has startedNo files available for downloadAre you sure you want to clear all files?It is recommended not to exceed {max} images at a time📦 Package download ZIP: ''' }[c];
});
}
function stripExt(name) {
return String(name).replace(/\.[^.]+$/, '');
}
function resolveEl(ref) {
if (!ref) return null;
return typeof ref === 'string' ? document.getElementById(ref) : ref;
}
function format(str, data) {
if (!data) return str;
Object.keys(data).forEach(function (k) {
str = str.split('{' + k + '}').join(data[k]);
});
return str;
}
function readI18n(sel) {
var out = {};
var box = document.querySelector(sel || '#ie-i18n');
if (!box) return out;
box.querySelectorAll('[data-key]').forEach(function (el) {
out[el.getAttribute('data-key')] = el.textContent.trim();
});
return out;
}
function loadImage(file) {
return new Promise(function (resolve, reject) {
var reader = new FileReader();
reader.onload = function (e) {
var img = new Image();
img.onload = function () { resolve(img); };
img.onerror = function () { reject(new Error('image decode failed')); };
img.src = e.target.result;
};
reader.onerror = function () { reject(new Error('file read failed')); };
reader.readAsDataURL(file);
});
}
function canvasToBlob(canvas, type, quality) {
return new Promise(function (resolve, reject) {
canvas.toBlob(function (blob) {
if (blob) resolve(blob);
else reject(new Error('canvas export failed'));
}, type, quality);
});
}
function makeCanvas(w, h) {
var c = document.createElement('canvas');
c.width = Math.max(1, Math.round(w));
c.height = Math.max(1, Math.round(h));
return c;
}
function ctxOf(canvas) {
return canvas.getContext('2d');
}
function fitSize(w, h, maxW, maxH) {
if (!maxW && !maxH) return { w: w, h: h };
var scale = Math.min(maxW ? maxW / w : Infinity, maxH ? maxH / h : Infinity, Infinity);
if (scale >= 1) return { w: w, h: h }; // 不放大
return { w: Math.max(1, Math.round(w * scale)), h: Math.max(1, Math.round(h * scale)) };
}
function thumbnail(img, maxSide, bg) {
var s = fitSize(img.naturalWidth, img.naturalHeight, maxSide, maxSide);
var c = makeCanvas(s.w, s.h);
var ctx = ctxOf(c);
if (bg) { ctx.fillStyle = bg; ctx.fillRect(0, 0, s.w, s.h); }
ctx.drawImage(img, 0, 0, s.w, s.h);
return c.toDataURL('image/jpeg', 0.9);
}
function buildUI(root, opts, labels) {
var uid = 'ie' + Math.random().toString(36).slice(2, 7);
var ids = {
drop: uid + '-drop',
input: uid + '-input',
panel: uid + '-panel',
preview: uid + '-preview',
toolbar: uid + '-toolbar',
addMore: uid + '-add-more',
downAll: uid + '-download-all',
clear: uid + '-clear',
count: uid + '-count',
list: uid + '-list',
empty: uid + '-empty'
};
var html =
'
[ImgEdit] readOptions error[ImgEdit] processing failed:[ImgEdit] Loading failed:[ImgEdit] editor.setup errorPacking, please waitPacking {done}/{total}Packaging completed, download has startedPackaging failed, please try againCopiedCopy failedIllegal characters:Expression is incompleteUnknown symbol:extra right bracketillegal expressionExpression has redundant contentThis site is a mirror site and the function has been disabledThe content of this page comes from Hongmu Notes. The copyright and functions are only authorized to be used on the original site.Visit original siteLocate that line and delete itSubmission failed, please try again later(Current data totalcolumn):''' }[c];
});
}
// ============ 主题切换(与博客首页同一套:data-theme + tui-theme)============
function isDark() {
var el = document.documentElement;
return el.getAttribute('data-theme') === 'dark' || el.classList.contains('dark-mode');
}
function setTheme(dark) {
var el = document.documentElement;
el.setAttribute('data-theme', dark ? 'dark' : 'light');
el.classList.toggle('dark-mode', dark); // 兼容部分工具内部旧的 .dark-mode 规则
try {
localStorage.setItem('tui-theme', dark ? 'dark' : 'light');
localStorage.setItem('a6_dark_mode', dark ? '1' : '0');
} catch (e) {}
}
function initTheme() {
var btn = document.getElementById('tuiThemeBtn') || document.getElementById('t-theme');
if (!btn) return;
function sync() { btn.classList.toggle('is-dark', isDark()); }
sync();
btn.addEventListener('click', function () {
setTheme(!isDark());
sync();
});
}
// ============ 返回顶部 ============
function initTop() {
var btn = document.getElementById('tuiTopBtn');
if (!btn) return;
function onScroll() {
btn.style.display = (window.pageYOffset > 300) ? '' : 'none';
}
window.addEventListener('scroll', onScroll, { passive: true });
onScroll();
btn.addEventListener('click', function () {
window.scrollTo({ top: 0, behavior: 'smooth' });
});
}
// ============ 工具目录:精确悬浮在内容卡片右侧 ============
// 用 JS 读取主体卡片的真实右边界来定位(不依赖 CSS 计算),
// 右侧空间不足时自动回退为顶部横滑胶囊(移除 inline 定位即可)。
function initTocFloat() {
var aside = document.querySelector('.t-toc-aside');
var main = document.querySelector('.t-layout .t-main');
if (!aside || !main) return;
var GAP = 14; // 目录与卡片间距
var W = 224; // 目录宽度(与 CSS 的 .t-toc-aside 宽度保持一致)
function reset() {
aside.style.position = '';
aside.style.left = '';
aside.style.right = '';
aside.style.top = '';
aside.style.width = '';
aside.style.maxHeight = '';
aside.style.overflowY = '';
aside.classList.remove('is-floating');
}
function layout() {
reset();
if (window.innerWidth < 1024) return; // 窄屏:胶囊布局
var box = main.getBoundingClientRect();
var left = Math.round(box.left - GAP - W); // 目录放在卡片左侧(与内容页目录一致)
if (left < 8) return; // 左侧放不下:胶囊布局
aside.style.position = 'fixed';
aside.style.left = left + 'px';
aside.style.top = '84px';
aside.style.width = W + 'px';
aside.style.maxHeight = 'calc(100vh - 110px)';
aside.style.overflowY = 'auto';
aside.style.zIndex = '5';
aside.classList.add('is-floating');
}
layout();
window.addEventListener('resize', layout, { passive: true });
window.addEventListener('load', layout);
window.setTimeout(layout, 300); // 字体/图片加载后校正一次
}
// ============ 外观设置(配色 + 字号,记忆在 localStorage) ============
function initAppearance() {
var btn = document.getElementById('tAppearanceBtn');
var panel = document.getElementById('tAppearance');
if (!btn || !panel) return;
function read(k) { try { return localStorage.getItem(k) || ''; } catch (e) { return ''; } }
function write(k, v) { try { localStorage.setItem(k, v); } catch (e) {} }
function apply(accent, fs) {
var el = document.documentElement;
if (accent && accent !== 'default') { el.setAttribute('data-accent', accent); }
else { el.removeAttribute('data-accent'); }
if (fs && fs !== 'm') { el.setAttribute('data-fs', fs); }
else { el.removeAttribute('data-fs'); }
var i, list = panel.querySelectorAll('[data-accent]');
for (i = 0; i < list.length; i++) {
list[i].classList.toggle('is-on', list[i].getAttribute('data-accent') === (accent || 'default'));
}
list = panel.querySelectorAll('[data-fs]');
for (i = 0; i < list.length; i++) {
list[i].classList.toggle('is-on', list[i].getAttribute('data-fs') === (fs || 'm'));
}
}
var cur = { accent: read('t-accent') || 'default', fs: read('t-fs') || 'm' };
apply(cur.accent, cur.fs);
btn.addEventListener('click', function (e) {
e.stopPropagation();
panel.hidden = !panel.hidden;
});
var close = document.getElementById('tAppearanceClose');
if (close) close.addEventListener('click', function () { panel.hidden = true; });
panel.addEventListener('click', function (e) {
var t = e.target;
if (!t || !t.getAttribute) return;
var ac = t.getAttribute('data-accent');
var fs = t.getAttribute('data-fs');
if (ac) { cur.accent = ac; write('t-accent', ac); apply(cur.accent, cur.fs); }
if (fs) { cur.fs = fs; write('t-fs', fs); apply(cur.accent, cur.fs); }
});
document.addEventListener('click', function (e) {
if (panel.hidden) return;
if (panel.contains(e.target) || e.target === btn) return;
panel.hidden = true;
});
}
// 页面底部脚本加载,DOM 已就绪,直接初始化
initTheme();
initTop();
initTocFloat();
initAppearance();
// ============ 对外暴露 ============
window.Tools = {
isLocal: isLocalFile || isWrongHost,
audio: getAudio,
toast: toast,
copy: copy,
note: note,
chord: chord,
midiName: midiName,
midiFreq: midiFreq,
NOTE_NAMES: NOTE_NAMES,
esc: esc,
theme: initTheme,
};
// ============ 本地/非法域名提示 ============
if (window.Tools.isLocal) {
document.addEventListener('DOMContentLoaded', function () {
var tip = document.createElement('div');
tip.style.cssText = 'position:fixed;left:50%;top:20px;transform:translateX(-50%);'
+ 'background:#e74c3c;color:#fff;padding:10px 20px;border-radius:8px;'
+ 'font-size:.9rem;z-index:99999;';
tip.textContent = '请从 4s5.cn 访问本工具';
document.body.appendChild(tip);
setTimeout(function () { tip.style.opacity = '0'; tip.style.transition = 'opacity .5s'; }, 3000);
setTimeout(function () { tip.parentNode && tip.parentNode.removeChild(tip); }, 3600);
});
}
})();
(function (window, document) {
'use strict';
var SEL = 'ins.adsbygoogle, ins.adsbygoogle iframe, iframe[id^=