People will be able to fill in the form via computer in 2011
People in Scotland will have the chance to complete census questionnaires online for the first time in 2011.
People living in west Edinburgh and on Lewis and Harris in the Western Isles will be the first to test out the new system in a dry run next year.
The General Register Office for Scotland said the online version would be available following the awarding of an £18.5m contract covering IT.
The census collects information every 10 years.
It seeks to map details such as age, gender, place of birth and marital status of people and households in the country.
It is used by central and local government, health authorities and many other organisations to allocate resources and plan services.
Registrar General Duncan Macniven said the website offering the online questionnaire would have "robust" security measures to protect respondents' confidential information.
He said: "The next census is the first to offer people the online questionnaire option.
"We studied other countries' approaches to using the internet for census returns and concluded that it offers many benefits."
Mr Macniven added: "Householders can choose the method that is most convenient to them: a paper or online questionnaire."