Lactulose is a non-absorbable sugar used to treat constipation and hepatic encephalopathy. It is used by mouth for constipation and either by mouth or in the rectum for hepatic encephalopathy. It generally begins working after 8–12 hours but may take up to 2 days to improve constipation.